Zonal statistics as table problems

1097
8
Jump to solution
05-22-2013 02:13 PM
VictorRamos
New Contributor
Hi Forum.  I have been trying to use zonal statistics as table to get majority values for each polygon in a segmentation shapefile (45K polygons processed in IDRISI and exported to shapefile) from a pixel by pixel classified image.  I can do that perfectly in Arcgis 9.3 with no problems at all, but in 10.1 it has been impossible to do it right, the resulting table has just 14K records with data, or in other words it´s processing just 1/4 of all the polygons with no clue on why (no patterns on polygon size, shape or values in the classified image).  I have already asked this question and some suggested that I made sure that the projections match (did that, same results), to get service pack 1 (also did that, same results).  I have now tried to convert first the shapefile to raster and then make the zonal analysis and to my surprise this conversion yielded just 14K records in the raster.  It then appears that the problem is in this vector to raster conversion that I understand is made anyway when you use zonal stats as table.  Can someone help please? 

Victor
0 Kudos
1 Solution

Accepted Solutions
SteveLynch
Esri Regular Contributor
try running RepairGeometry on the polygon featureclass

View solution in original post

0 Kudos
8 Replies
SteveLynch
Esri Regular Contributor
try running RepairGeometry on the polygon featureclass
0 Kudos
EricRice
Esri Regular Contributor
Generally there are two main reasons why the conversion to raster results in fewer records than the input.

1. There is overlap within the polygons.  When converted the underlying pixel can only be one value, not both.  So one is discarded.

2. You have chosen a cell size (or accepted the default) that isn't appropriate given the size of your smaller polygons. If the areas of single features are similar to or smaller than the area  of single cells in the value raster, in the feature-to-raster conversion  some of these zones may not be represented.

Both of these topics are covered under Usage in the Zonal Statistics as Table doc, including tips to get around.

Best Regards,
Eric
0 Kudos
VictorRamos
New Contributor
Will try this.  Thanks.

VHR
0 Kudos
VictorRamos
New Contributor
Thanks for your suggestions.  On them:
1- This shapefile doesn`t have overlapping polygons to my best knowledge and it worked right in 9.3
2- I choose the raster cell size, 5 mt and that is appropiate

Thanks again

VHR
0 Kudos
EricRice
Esri Regular Contributor
So you got all the records you expect using 5m cells?

Best,
Eric
0 Kudos
VictorRamos
New Contributor
So you got all the records you expect using 5m cells?

Best,
Eric


No, I tried with 5 mt since the beginning because I knew that was the way to go, but still it did not worked.  Is really strange since exactly the same routine runs smoothly in 9.3

VHR
0 Kudos
EricRice
Esri Regular Contributor
Interesting...  Did you try a smaller cellsize just to test to see if you get more records?  Did you try Steve's suggestion to check and repair geometry?  You could also try converting the feature class into another feature class before attempting to convert to raster.  The issue isn't with the zonal tool at this point.  It's either some bad data or something with the conversion tool.  However, the conversion to raster has pretty much always worked for me in 10.1.  Do you have sp1 installed?  If not, try installing it and test again.

Can you creat a support ticket?

Best,
Eric
0 Kudos
VictorRamos
New Contributor
Solved!!!  Repair geometry was the solution.  I just used that before extracting zonal statistics and it worked great.  Thanks to all for your help.

VHR
0 Kudos