How to Relate or Join Zonal Statistic result to Polygon

2707
4
11-30-2010 07:06 PM
KayDancey
New Contributor
Am I missing something basic?

I have a polygon layer of language borders over South East Asia, with the only unique field in the attribute table being the FID. I need to know the min and max elevation within each polygon which I have successfully done using the Spatial Analyst tool, Zonal Statistics (using language polygons & DEM). The result of this tool gives an attribute table with fields, Rowid, Value & Count.

My problem is I would like the result of the Zonal Stats tool (Value in the attribute table) to relate to or join or somehow link to the original polygon but I can see no common field on which to do this. Ultimately I need the min and max values in the attribute table of the language polygons.

I am a newby to this so any help would be gratefully received. Thank you.
0 Kudos
4 Replies
KayDancey
New Contributor
Thanks Bill. Unfortunately they don't. I didn't generate the language polygons and I have seen a few errors in it. Would this explain the FID & Rowid not corresponding?
0 Kudos
toddsams
New Contributor III
Option #1 - Try using the Geospatial Modeling Environment (GME, formerly Hawth's Tools) http://www.spatialecology.com/gme/

There is a function called isectpolyrst (i.e. intersect a polygon with a raster). It provides statistics for each input polygon (including max/min) based on an input raster and codes them straight to the polygon file. No rasters are created with this tool.

I will say that installation is a bit cumbersome with dependencies on several other third-party software packages, and the program functionality can be quite buggy, but I have been able to get it to work and it has been quite helpful for tasks like this, among other things.

Option #2 - You can also try converting the rasters to polygons and intersecting them with the language borders. Then, export the attribute table and summarize the results with a pivot table. Then, join it back up with your language borders.

I have also successfully used this method, but it can be messy because the zonal polygons will likely pick up two different values since the polygonized raster borders will be jagged and not match exactly with your language borders. In the cases where a language border picks up two different max elevations, for example, you would want to pick the value that is associated with the largest area. All of this needs to be worked out in Excel using pivot tables.

Neither method is going to be quick and easy your first go at it, but i would say that the GME route is better especially if you think you will be doing calculations like this in the future.
0 Kudos
KayDancey
New Contributor
Thank you both very much. I will try all 3 approaches. Will need to do this analysis again so GME would be useful if I can get it working.
0 Kudos
toddsams
New Contributor III
Something else to try would be to create the Zonal Statistic raster like you already have. Then, covert the language polygons to points (centroids). Then, use "Extract Values to Points" to code the Zonal Statistic to the polygon centroids and then join the values back to the polygon data.
0 Kudos