Monday, February 20, 2012

ArcGIS and Python

This youTube Video summarizes the role that Python plays in ArcGIS. it is bit long, but the overview is good.

Another Tutorial on Python Classes.

This is a great YouTube tutorial that deals with several special class methods. First, there is brief mention of the constructor method, which was dealt with in the previous posts.

Second the string method is mentioned: (3.33). This method, if present, prints out what ever you tell it to print out about the self object. Whatever is printed out is contained in the string following the return statement
def __str__ (self):
return ('(0)is (1) years old.'.format(self.name, self.age)


The delete method __def__ (self) is next discussed. When called, this method deletes an object. To delete an object, call the function and supply the object name.

Class variables. These are stored in the class and not within a particular method. Any method can access a class variable.

Finally static methods are discussed. These are methods independent of the self object.

Great tutorial! take a look at it.




Sunday, February 19, 2012

Python Classes

Each Python Class has a constructor method which is responsible for creating an instance of the object when the class is called. The constructor method is written just after the class is declared. The constructor method is called using the __init___ command. Python actually calls the method and passes the user-supplied name to the method as a parameter. The YouTube video below gives a good introduction to Python Classes.




Friday, February 17, 2012

Experimenting with Google Earth.




Saturday, February 11, 2012

Monday, December 12, 2011

Experimenting with Google Earth

Sunday, December 11, 2011

Kriging

Today, I will look at some of the assumptions underlying kriging, and important exploratory data analysis summaries, that should be obtained when performing kriging. As you know, Kriging is a geostatistical technique used to interpolate surfaces. It is similar to IDW in that the Z-values are weighted by some parameter. In IDW, Z-values are weighted by the inverse of the distance between the points. In kriging, z-values are weighted by the rate at which variance between sample points changes over space, that is, by the spatial autocorrelation between sample points.


Assumptions
Kriging should only be applied if the following underlying assumptions are met:

1. The data shows existence of second-order stationarity, i.e., at a minimum the mean and variance of the sample data should remain invariant in space. If the mean and variance of the samples are not stationary, then kriging may not be the best interpolation technique to apply.

2. The data represents one single homogenous domain.

3. A sufficient number of sample points should exist. Approximately 40 samples are needed to reasonably define and model a variogram, which can be used to produce an acceptable kriged
estimate.

EDA Output
In ArcGIS, before running kriging interpolation, you should explore the data before modeling the surface. Some things that should be explored include:
1. The number of sample points.
2. The minimum and maximum values in the distribution.
3. The variability of the distribution (variance and standard deviation)
4. The histogram of the distribution with coefficients of skewness and kurtosis,
5. Quantile-quantile (QQ) plots.
6. The semi-variogram cloud and fitted model. An example of a semi-variogram model is shown below:


1. At locations close to the origin, the semi-variances are low values, implying high levels of autocorrelation.
2. As distance (h) increases, variance also increases but levels off with increasing distance from the origin.

3. A constant variogram values imply that the variance between values does not change with distance.

In ArcGIS, the researcher can choose to fit one of several models to the variogram cloud in order to best capture the overall trend in the data (see illustration below). The best fit line can then be used to obtain values for all distance values (h). Alternative models include:

  • Linear - a straight line with a positive slope.
  • Spherical - rises rapidly then curves to the sill.
  • Exponential – rises more gradually and is asymptotic to the sill.
  • Gaussian – parabolic near the origin, then rises steeply toward the sill.