crop data analysis

2712
1
11-05-2013 07:12 AM
JustinBrandt
New Contributor
Hello, apologies if this has been discussed before, but I wasn't sure how to find what I needed with searches...

First, the stats:
-Novice user (little to no python experience, but been using basic functions of ArcGIS for several years)
-ArcMap 10.0 or 10.1

Okay, I have a couple shapefiles, one that is a uniform grid (with row/col's), and another shapefile that has farm fields and the crop being grown on that field.  I want to be able to figure out which crop type is the "dominate" crop for each of the grid cells.  The crop fields vary is size, shape, etc... and many times overlap into other grid cells.  There are hundreds of grid cells.

Here's a quick image (hope it comes through). You can see the colored crop polygons with the uniform grid on top.

[ATTACH=CONFIG]28870[/ATTACH]

I did a Union of the two shapefiles (above image), I'm just not sure how to go to the next step(s) and calculate the dominate field "type" for each grid cell.

Any help would be appreciated.

Thanks!
0 Kudos
1 Reply
XanderBakker
Esri Esteemed Contributor
Hello, apologies if this has been discussed before, but I wasn't sure how to find what I needed with searches...

First, the stats:
-Novice user (little to no python experience, but been using basic functions of ArcGIS for several years)
-ArcMap 10.0 or 10.1

Okay, I have a couple shapefiles, one that is a uniform grid (with row/col's), and another shapefile that has farm fields and the crop being grown on that field.  I want to be able to figure out which crop type is the "dominate" crop for each of the grid cells.  The crop fields vary is size, shape, etc... and many times overlap into other grid cells.  There are hundreds of grid cells.

Here's a quick image (hope it comes through). You can see the colored crop polygons with the uniform grid on top.

[ATTACH=CONFIG]28870[/ATTACH]

I did a Union of the two shapefiles (above image), I'm just not sure how to go to the next step(s) and calculate the dominate field "type" for each grid cell.

Any help would be appreciated.

Thanks!


Hi Justin,

A Union is indeed the first step. What I understand from your image is that several parcels with the same crop may occur within a single grid. In this case it is not a matter of simply determining the largest crop polygon within grid polygon. You will have to sum up the area of the same crop within each grid polygon. To do this you can follow these steps:

  • Add a new TEXT column

  • Fill this column with the ID of the grid polygons and the Crop (description or ID) like this: [gridID] & "#" & [crop] (this creates a unique text for each crop and grid combination. the "#" should be a characters that is not used in either columns.

  • Add an area column to you table if you don't have one yet (in case of shapefiles)

  • Next you summarize your data based on this new column, in which you want to determine the SUM of the area column

  • This table should be joined back to your Union data (based on the combined column you created).

  • Use a select statement to select those records where the joined SUM area equals the individual area. Those records hold the predominant crop.

This type of analysis could be carried out in raster format as well (requires Spatial Analyst) using the Zonal Statistics (using MAJORITY as statistics type). The outcome is less accurate (depending on the cell size you use).

The other alternative would be using Python. You can loop through the union data and build a dictionary holding the grid#crop as key and the (summed) area as value. In the second loop you determine the largest area for each grid polygon which could be joined back using a cursor to the original grid polygons.

Kind regards,

Xander
0 Kudos