Select to view content in your preferred language

Zonal Statistic As Table--Problem calculating MEAN-Values

6333
10
03-05-2012 09:35 PM
by Anonymous User
Not applicable
Original User: patflo

Hello i`ve got a problem doing the zonal statistic calculation with a layer and a shape-file. My layer is a temperature layer for europe and my shapefile is a polygon shapefile from Germany. When i want to do the MEAN calculation for every polygon in the shapefile it gives me MEAN-Values for the temperature of -1100 degrees. I think the problem is that some of the polygons are not fully covered by the raster layer? Has someone an idea how to get the correct values?

in the attachement i put a pic of the shapefile with the raster layer and the table.

Thanks in advance for your help
0 Kudos
10 Replies
by Anonymous User
Not applicable
Original User: fabl

Resampling the raster to a smaller cellsize may help.
Think about the ignore_nodata-option.
Read the help:
http://help.arcgis.com/de/arcgisdesktop/10.0/help/index.html#//009z000000w8000000.htm
0 Kudos
FlorianPattis
Emerging Contributor
I tried it with resampling and it gives more "realistic" values. But when i compare the values from the zonaltable without resampling with the zonaltable with resampling i noticed that the the values are totally different. my idea is that the zonal statistic doesnt get the novaluedata-information correct from the raster and thats why it gives -1170. In my raster the nodatavalues are marked with -9999.

i tried both ways with the ignore-nodata-button but it didnt change the result.

Is it possible that he doesnt detect the nodata values?

thanks for ur help!

heres the table with resampling [ATTACH=CONFIG]12434[/ATTACH]
0 Kudos
by Anonymous User
Not applicable
Original User: fabl

Check in ArcCatalog the NoData Value of your raster (context menu of the raster -> Properties -> Raster Information).
If this is not ok, use SetNull. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009t0000002v000000
0 Kudos
JeffreySwain
Esri Regular Contributor
Is the Nodata value of -99999 indicated in the source properties?  Or is it known to you as the filler.  Traditionally the value of Nodata will appear as Null and you will not get any information for the zones with the Null.  If you have a different nodata value described in the source properties, but have values of -99999 in your raster that you recognize as Nodata.  I would consider setting the Null value of -99999 if the ID button returns a value of -99999 when you select the raster nodata areas.  The NoData should not be considered in the calculation of the mean. 

I would follow the previous recommendation and set the -99999 values to Null which should prevent the calculation error.
0 Kudos
by Anonymous User
Not applicable
Original User: patflo

The nodata Values are set as -9999 in the properties of the layer. When i change the fill color for the nodata cells i can see them in the raster. I will try the setnull-method and let u know if it worked.
0 Kudos
FlorianPattis
Emerging Contributor
Hello again..i tried it with the setNull Method but i cant get the values of the single cells out of the where clause. When i look into the attribute table of the layer there is only one value specified. How can i get the values of each cell to see if the value is "-9999" so that i can change it into "0".

In the attachement there is the layer and the attributetable, the nodata fields are filled red.
0 Kudos
by Anonymous User
Not applicable
Original User: fabl

Your "-9999" is alredy marked as NoData. SetNull will not help you.
Maybe its better to export the raster first (eg grid or img)?
You can also try first to do it with the polygons completely lying over the raster (without NoData). Maybe this brings us closer to the problem.
0 Kudos
JeffreySwain
Esri Regular Contributor
So you are setting the Nodata in Properties to red and getting the output there.  Correct?  If that is the case then the value is correctly set and should be ignored because when you identify it it should say NoData/Null. 

Let us back up a bit.  Have you tried to evaluate the zone in particular and see if there are nodata pixels? Also I would consider converting the particular polygons into a raster to see where they are actually pulling from.  Be sure to specify a cell size to match the raster.

I would still consider it a bug if the nodata value is being considered in the calculation.  The options for the NoData would be to ignore any zone that contains a nodata value or just ignore the nodata value.  I would recommend creating a Support Incident and have someone take a look at your data specifically.
0 Kudos
by Anonymous User
Not applicable
Original User: patflo

Yes thats correct it identifys the nodata value but it is not identified in the calculation as nodata values. To whom can i send the layer and the shapefile to see if it is a bug?
0 Kudos