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 use a python script in which the function ZonalStatisticsAsTable is called. In ArcGIS9.3 it all worked fine. Our company just went to ArcGIS 10.1 and now it doesn't work anymore. When looking inside the resulting temporary tables it seemed the name of column number 2 was changed from "VALUE" to "NR". I changed it in the script and it all seemed to work fine. But, the results are very different from these in 9.3.

As input I use a rastermap with cellsize of 1x1km and a Polygon feature. I guess the polygon is converted to a raster first before the comparison is made. Whenever I first use "polygon to raster" to created a raster and use "Zonal Statistics as Table" with these two rasters as input the results are fine.
What goes wrong using then function ZonalStatisticsAsTable in the Pythonscript? Regards, Wilco.

share|improve this question
1  
Are the statistics the same between the two versions? For example, are you calculating "MEAN" in 9.3 and "MAJORITY" in 10.1? –  Aaron Mar 29 '13 at 14:25
    
Yes, the statistics are the same. I think I found why the results were different. This was because the file-format we are using was not implemented correct. A shift of 500m up and to the left. So I get exactly the same results now but I still do not understand why I get "NR" instead of "VALUE" in column number 2 in the outputtable form ZonalStatistics? Thanks for the help –  Wilco de Vries Mar 29 '13 at 15:53
add comment

1 Answer

As input I use a rastermap with cellsize of 1x1km and a Polygon feature. I guess the polygon is converted to a raster first before the comparison is made.

When you do raster analysis in ArcGIS, it's a best practice (especially with 10.x) to make sure that the ArcGIS geoprocessing environments for extent, cell size, and snap raster are set to appropriate values.

My guess is you have not set the snap raster which is are not getting your cells to line up as needed to get the results you want. This would explain why when you use a raster zone instead of polygons you are getting what you want - the zone raster has the cells "snapped" to the same cell boundaries as your 1 km input.

Esri's help on Snap Raster has a nice graphic that explains this.

share|improve this answer
add comment

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.