Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using Kansas Cropland raster data from NASS with tabulate area to find out acreage of different crop types. The python I used works fine for 2006-2009 (56 meter cell size), except 2010 & 2011 when they switched the cell size to 30 meter. Every time I ran it would generate empty attribute table (zero values for all field). I checked raster dataset properties to compared 2010 with previously successfully ran rasters, the only different is the cell size and not allowing null value after 2010; attribute tables setup are identical.

The python I used to ran tabulate area, as shown following:

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "H:/Projects/Ogallala_2012/Docs/Tables"

# Set local variables
inZoneData = "H:/Projects/Ogallala_2012/Geodatabase/Imagery.gdb/ks_counties_30m"
zoneField = "FIPSSTCO"
inClassData = "H:/Projects/Ogallala_2012/Geodatabase/Imagery.gdb/NASS_cropland_2010"
classField = "Class_Name"
outTable = "H:/Projects/Ogallala_2012/Docs/Tables/cropland2010"
processingCellSize = 30

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Execute TabulateArea
TabulateArea(inZoneData, zoneField, inClassData, classField, outTable,
             processingCellSize)

I've tried to use both raster and feature data to define the zone area,but attribute table still came back empty. However, when I ran a zonal statistics, it came back with values that seems right. I also ran tabulate area in both model builder and toolbox it would just crash.

Attached is the empty attribute table it generated. enter image description here

Thanks for helping!

share|improve this question
    
How many zones are in the ks_counties_30m layer? What are the dimensions of the 30m NASS rasters? Spatial analyst geoprocessing tools are very old, and many have issues with either large numbers of zones (greater than 2^16) or very large rasters. –  dmahr Jun 19 '12 at 19:06
    
There are 105 zones in the ks_counties_30m. The dimensions of NASS 30m rasters are entire State of Kansas (column 22025, row 11317), and 56m dimension is column 11799, row 6063? Is there another way or tool I can use to get crop values in each zones, other than tabulate area? –  asianpenguin Jun 19 '12 at 19:55
    
Not really, Tabulate Area is definitely the tool you want to use. When you rasterized the zone data, did the output raster have the same spatial reference, pixel size, and snap raster as the NASS data? If not, try setting them in the Environment Settings > Raster analysis. –  dmahr Jun 20 '12 at 0:27

1 Answer 1

Have you tried running the tool straight out of the toolbox? I had a similar issue and it turned out to be that running it from python seemed to some how mangle the tool.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.