Select to view content in your preferred language

Polygon density

7195
4
08-25-2011 12:06 AM
MatejTacer
Deactivated User
Hi,
I need to overlap a grid over the polygon layer and calculate the sum of polygon areas for each cell. The output should be a raster layer. So, I have only polygon layer and need to create raster showing sum of areas in each cell.
The problem is similar to LineDensity tool for lines, but I can't find the appropriate tool for polygons.

Thanks for your suggestions,
0 Kudos
4 Replies
BruceNielsen
Frequent Contributor
If you want to try a vector-only approach, you could use the Generate Fishnet tool to create your grid, the Intersect tool to find the relationship between your polygons and grid cells, then Summarize to find the area of the polygons that touch each grid cell.
0 Kudos
MatejTacer
Deactivated User
Thank you, Bruce!
That's what I've resorted to:
I created grid using python and osgeo.ogr, union and area calculation are yet to be done. Python comes in handy since I need to do it for 1000+ layers.
BTW, not sure if I understand that Dodt's opinion of Python - sounds like criticism. If that's so, I strongly dissagree :-))

Best,
0 Kudos
BruceNielsen
Frequent Contributor
BTW, not sure if I understand that Dodt's opinion of Python - sounds like criticism. If that's so, I strongly dissagree :-))

Best,


Believe me, it's not a criticism. He's making the point that Python is far superior to BASIC (and a lot of other languages IMHO) by orders of magnitude. To fully appreciate Optimus Prime's abilities relative to those of a pickup, view one of the Transformers movies.
0 Kudos
JeffreySwain
Esri Regular Contributor
Not to break up the Transformer party, but perhaps the zonal tools may yield an answer.  Dare I say, "they are more than meets the eye." 

I am not sure what you mean by "sum of polygon areas for each cell."  The Zonal tools can generate a raster output based on a 'zone' or polygon/raster, but to find the number of polygons per cell makes me think you have a rather larger cell for the raster or tiny polygons.  Based on what I think you mean, I would recommend the Zonal Statistics and choose "sum."
0 Kudos