Zonal Statistics as Table on Model Builder!!!

3257
25
Jump to solution
07-23-2013 11:13 AM
ShikoNjuno
Occasional Contributor
So I have a model that utilizes the Zonal Statistics as a Table tool and it runs beautifully. However, the output is incredibly false.

The input feature zone data is a shapefile comprised of a select few polygons.
The zone field selected is FID.
The input value raster is a .tiff file which stores the correct values for the output.
The output table is saved to the workspace chosen by user.
And the statistic performed is the MEAN. Which means the output for every FID row is an average of all pixel values in the raster file within that polygon shape.

What's happening when the model runs is that the output is just incorrect....almost like there is no zonal recognition happening.
Is anyone familiar with this and perhaps what I can do to make the output correct??
Thanks
0 Kudos
1 Solution

Accepted Solutions
ShikoNjuno
Occasional Contributor
Interesting things is why you are using MEAN value for landuse code(?)? Want to see the changes after year by year?


This got me thinking....there's no reason to look at the MEAN of the raster files, really what I want is the MAX because in the event that land were to be fallowed in the future, for instance, that statistic tells me the maximum value "lost". And then if I wanted to perform a MEAN statistic, it would be for several of the polygons from the shapefile; this could be done via a Field Statistics analysis!!!!
Problem solved 😄
Thanks for leading me down that thought process!
Cheers.

View solution in original post

0 Kudos
25 Replies
AliciaMein
New Contributor III
I dont know if the tiff input is a problem?  I usually use grids. 
Also, what about cell size?  What is the cell size of the tiff, then have you set the environment up for your analysis?
0 Kudos
ShikoNjuno
Occasional Contributor
I dont know if the tiff input is a problem?  I usually use grids. 
Also, what about cell size?  What is the cell size of the tiff, then have you set the environment up for your analysis?


Well, the cells are pretty tight.....60 by 60.
What environment settings in particular should I adjust? Right now I only have the Workspace environment setting checked...I'm not quite sure about the rest.
0 Kudos
ShitijMehta
Esri Regular Contributor
Hi Shiko,

How are you selecting the polygons?
Are you sure the selection is being passed to the next tool?
How is your output incorrect? Are the values wrong or all records Null?



Always consider attaching a snapshot of the model with the forum post. It makes it easier to see the upstream and downstream processes.
0 Kudos
ShikoNjuno
Occasional Contributor
Hi Shiko,

How are you selecting the polygons?
Are you sure the selection is being passed to the next tool?
How is your output incorrect? Are the values wrong or all records Null?



Always consider attaching a snapshot of the model with the forum post. It makes it easier to see the upstream and downstream processes.


Shitij I've actaully been struggling with that, which is why I haven't. Maybe you could walk me through the process.
What I was trying to do is copy the model by doing a PrintScreen and then converting the image to a JPEG or other image file but to no success. How do you usually do it?
0 Kudos
TOMKONG
Occasional Contributor II
So I have a model that utilizes the Zonal Statistics as a Table tool and it runs beautifully. However, the output is incredibly false.

The input feature zone data is a shapefile comprised of a select few polygons.
The zone field selected is FID.
The input value raster is a .tiff file which stores the correct values for the output.
The output table is saved to the workspace chosen by user.
And the statistic performed is the MEAN. Which means the output for every FID row is an average of all pixel values in the raster file within that polygon shape.

What's happening when the model runs is that the output is just incorrect....almost like there is no zonal recognition happening.
Is anyone familiar with this and perhaps what I can do to make the output correct??
Thanks


Esri analyze tool only works well under the projected GRID data format (ESRI raste format).
So convert it to grid format first.
0 Kudos
ShikoNjuno
Occasional Contributor
Esri analyze tool only works well under the projected GRID data format (ESRI raste format).
So convert it to grid format first.


How do I go from TIFF to GRID?
0 Kudos
TOMKONG
Occasional Contributor II
How do I go from TIFF to GRID?


Export it as GRID (from drop down window to select).
0 Kudos
ShitijMehta
Esri Regular Contributor
Print screen > Copy to powerpoint >crop the image and right click the image to save.
Use free version of image capturing softwares> snagit

or

http://www.faststone.org/download.htm
0 Kudos
ShikoNjuno
Occasional Contributor
Thanks Shitij. Take a look.
Hope you can see this okay.....

[ATTACH=CONFIG]26159[/ATTACH]

The selection is based on a shapefile which has about 15 polygons, which should be zonally linked to the rasters via the Zonal Statistics as Table tool......right?!!?!
So the output is incorrect in that it just doesn't match what the corresponding raster files have as stored values, which is what I was expecting. I understand that the statistic is performed as an average of the pixels within each polygon, but the output for some of the rows is assigned a value even when I know for a fact there is no value i.e. the output should be zero!!!

I hope this isn't too confusing.
Let me know what you think.
Thanks.
0 Kudos