Thursday, March 10, 2011

Kriging

Kriging is a special form of spatial interpolation. Really, it's a fancy and statistically specific way for taking data that you have in "point" form (like plot data) and putting it in "map form" (like an image). Fundamentally, I find it easiest to think about in terms of X,Y, and Z coordinates. In space, you normally describe elevation as "Z". But really that Z doesn't have to describe elevation, it could describe anything-- number of trees, family income size, biodiversity, etc.--- So with Kriging, it's that you know the value of this "Z" coordinate at some places in space, but you know the values of X and Y (just your locations) everywhere. Using the distance between known values of the Z coordinates, as well as the variance between these Z values, we can extrapolate between them in space.

Now there's some freedom when it comes to how this extrapolation is done, but I would say generally to be safe it's best to try a few different extrapolation patterns. These patterns describe the shape of the variance between points. Spherical patterns, for example, indicate that the variance between two points has a maximum at some certain distance. Exponential patterns indicate that the variance continues to get bigger. Oscillating or "hole effect" patterns indicate that your pattern may be repeating itself, etc. I generally think spherical is a good "first guess" but that's me. Well, actually, that's also ArcGIS.

So you've got some data and you've joined it to your locations (See my joins and relates post, below).Now what you will want to do is first-- and no one ever tells you this but it's REALLY important--
CONVERT YOUR POINTS TO A FEATURE FILE-- a point feature file.

Okay now the key
To do this sucessfully is... whatever you are displaying in your locations (also a feature file, strangely enough), that is what is going to convert. So if you have 9 joins, make sure you are displaying the one you want. Now go to Data Management Toolbox and select Feature to Point. Convert that feature to a point file named whatever you want.
Good! Okay! Now wait a long time, hope it doesn't crash.
Now, you've got some points that hold your data. Go to the Spatial Analyst and choose Kriging

Okay! So key here is the second entry box. The first just choose your file. The second-- MAKE SURE YOU CHOOSE THE DATA YOU WANT TO KRIG. It defaults to the name of your locations (objectID or something). And Kriging can run slowly!
It WILL sometimes switch back on you just to be evil. BE CAREFUL!!!
Now you can select your Krig shape if you want.... spherical I have chosen here.
Now it will run for a long time, and slowly.
Oh god! So ugly! That's because we need to extract it (sigh of relief).
Forgive me Komogorov, for I have BINNED.
Now we extract using a mask of something the size that we want. I can't remember if I've written a post on Mask Extraction. It's in the spatial analyst Toolbox. It works like a cookie cutter-- you place it on top of your badly sized image and it extracts one of the size of the "cookie" which is the image of the appropriate size.


Okay! KRIGED!

No comments:

Post a Comment