0

I want to extract statistics from a polygon using other smaller polygons as the mask. The smaller polygons have unique id numbers that I want to assign the calculated statistics too. If I wanted to get statistics from a raster, I would use zonal statistics and use my small polygons to delineate the boundary of where I want my statistics from in the raster (as in this post Iterating through multiple polygons to produce a table with elevations using DEM?). The zonal toolbox only seems to accept rasters as the input value (see image below)

enter image description here

Is there a way that I can extract the statistics from a polygon (instead of a raster) using other polygons as the 'mask' or boundary of where the data is taken from?

I tried an intersect, but that just cut out the shape of the smaller polygon, without retaining all the attributes from both layers (I lost my unique id).

I also tried a spatial join, which seems to have pulled the data together from both attribute tables, but I don't think it actually calculated statistics on any of the values (I think it just returned one value from within the polygon boundary).

My smaller polygons are overlapping, so I also may need to split them first and iterate through whatever steps are suggested to me in ModelBuilder (as is the case in this post:Iterating through multiple polygons to produce a table with elevations using DEM?).

This is a screenshot of the output I get from 'intersect'...note that my stationnrs are all the same...as opposed to acting like unique identifiers enter image description here

migrated from gis.meta.stackexchange.com Jul 13 '16 at 12:16

This question came from our discussion, support, and feature requests site for cartographers, geographers and GIS professionals.

  • Please take the Tour to learn about the site protocols. Rather than ask your question again in a different way you should edit the original to improve it. – PolyGeo Jul 13 '16 at 12:26
  • This post is asking how to extract statistics from a POLYGON using a polygon. Not extracting statistics from a RASTER using a polygon. It appears to me that these are two entirely different questions. – GIS_newby Jul 13 '16 at 14:01
  • @ Polygeo I would appreciate if you could remove the 'duplicate' tag from my post. Thanks for migrating it to where it needed to be. – GIS_newby Jul 13 '16 at 14:05
  • I've re-opened it but I think you should edit both questions to make them clearer. – PolyGeo Jul 13 '16 at 14:14
  • Simple intersect will do. However before summarising you all have to weight numbers by area to find e.g. mean value – FelixIP Jul 14 '16 at 4:46
1

You should store unique a copy of your unique ID field in a field otherwise it could change (e.g. is you edit or merge fature classes). With this additional field you can use intersect (or union) combined with "summarize table" in order to extract your statistics.

That being said, it seems that you are looking for the tabulate intersection tool, but this tool is equivalent to "tabulate area" and not to zonal statistics.

  • I don't understand what you are saying I'm afraid? Store a copy of my unique field where? Why would it change?Or rather, why is it changing? My smaller polygons I am using to delimit the area that I want the zonal statistics from have there own unique ID in their attribute table – GIS_newby Jul 15 '16 at 11:06
  • the OBJECTID field (or FID field, name differ when you have different data format) is an unique identifier. You can create a new field to make a copy of this field so that you are sure to track your feature. When you intersect, the attributes of the "parent" features are transmitted to the new feature. Because of the overlaps, you have several children for one parent, so your stationnrs are no more unique. Use summarize table to get a unique value for each parent. – radouxju Jul 16 '16 at 19:41
  • I have tried what you suggested, but I can't seem to make a copy of the unique identifier, I can't paste the information into the new field created. I think there is something wrong with my editor toolbar. I can't get it to open. – GIS_newby Jul 20 '16 at 9:28
  • you need to use the following tools : "add field", then "calculate field" – radouxju Jul 20 '16 at 10:49
  • I created a new copy of my unique identifier column in my attribute table and reran the 'union' and the resulting attribute table still has only one number repeated in both the original and copied column (which when I think about it, makes sense as I used the field calculator to create the copied unique identifying numbers (because I couldn't copy and paste the whole column into the added field). Any other suggestions? – GIS_newby Jul 21 '16 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.