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.
Thanks for helping!
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.