Creating an ArcView polygon shapefile to match the grid specification of a GeoEAS kriging output file.

To create, a grid shapefile to match grid specifications of a GeoEAS kriging output file using ArcView Spatial Analyst, I use an indirect procedure because a direct procedure is not currently available. 

The properties of the GeoEAS kriging output file are defined in  the Grid Parameters section of the kriging menu (see 2, below).  The Grid Parameters are selected so that grid cells of an appropriate spacing span the area of interest.  The coordinates for the origin are the coordinates of the center of the lower left cell in the grid. The spacing gives the size of the grid cells in the x and y directions.  In ArcView, the grid cells are square, so the x-spacing needs to equal the y-spacing.

To create a grid shapefile in ArcView, I start with a point shapefile, consisting of a single point located within the grid area of interest.  In this case, it means selecting a point whose x and y values are somewhat greater than the x and y values of the origin shown in the Grid Paremeters section (see 2 above: x=50000, y=3520000).   Open ArcView in a new project in a new view, add appropriate background shapefiles (such as counties.shp) and from the view dropdown menu select "New Theme", chose "point theme", and give it a name (here we call it "startpoint", but any name will do).  Press the point icon, and position the cursor inside the area where you want the grid and click.  Then choose save and stop editing from the Theme drop down menu.

Choose Properties from the Analysis drop down menu (if the Analysis menu option is not present, be sure that the Spatial Analysis extension box is checked (see File--> Extensions).
The Properties window will appear (see below).  Fill in the the grid property boxes to match the grid parameters from GeoEAS (see first figure above).  Note that since the coordinates  for the origin in the Grid Parameters section in GeoEAS is for the center of the lower left grid cell (50000, 3520000), to get the Left coordinate in the Analysis Properties box you need to subtract one-half the cell size (=the x and y spacing) (in this case, one-half of 6400 -- see first figure above). So, the left coordinate is 50000-3200 = 46800.  Similarly, the bottom coordinate in the ArcView Analysis Properties box is the value of the GeoEAS y-coordinate minus one-half the cell size (again, 3200).  So, the bottom coordinate should be 3520000 - 3200 = 3516800.  The Top coordinate is the bottom coordinate plus the product of the number of rows (y-cells in the GeoEAS Parameter section) and the cell size [(40*6400)=256000].  So, the Top coordinate is 3516800+256000, which equals 3772800.  Similarly the Right coordinate is (left coordinate) plus [(number of columns (x-cells)) times (cell   size)] =  46800 + [100 * 6400 ] = 46800+640000= 686800.

With the startpoint.shp active, select find distance from the analysis drop down menu.

The result is an Arcview grid file with the grid properties defined as above and with grid cell values being the distance from the selected point.  We want to convert the grid theme to a shapefile.  To do this in ArcView, first we need to make the grid cell values integers. Select Map Calculator from the Analysis drop down menu.

You will see:

1 Doubleclick on "Distance to Startpoint.shp".
2 Chose Arithmetic from the function drop down menu.
3 Press the Int function button.
4 Press Evaluate.

As shown above, with the Map Calculation theme highlighted, select convert to Shapefile from the drop down menu.  I chose the name "grid6400" for the shapefile. Save the shapefile in an appropriate folder (subdirectory).
The shapefile will appear on the Table of Contents.
Press the Open Theme Table icon to bring up the table for grid6400.shp.

Using Add field from the Edit drop down menu, add for new integer fields:  XCENT, YCENT.

Then with XCENT highlighted, Choose "Calculate" from the field drop down menu.

As shown below, in the field calculator window, 
1. Double click the [Shape] field.
2. Type ".ReturnCenter.GetX" after "[Shape]".
3. Click OK.

Repeat for YCENT as above except type GetY.

This gives the X and Y coordinates for the center of the grid cells.
 


As shown above, Save edits and Stop Editing.
The table will be saved as a .dbf file with the name of the shapefile (here grid6400.dbf). 

This table can be imported into the MS ACCESS database that contains the GeoEAS output data using the "Get External Data" option from the File Drop down menu.  Browse to the folder where the above shapefile was created and select a dbase format as the file type.

The next step is to link the two tables using MS ACCESS.
 


U of A Geostatistics | U of A Plant Pathology GIS Home | U of A GIS
 
Contact:  Tom Orum at torum@ag.arizona.edu
  Merritt Nelson at mrnelson@ag.arizona.edu
01/10/00 http://ag.arizona.edu/PLP/GIS