Wednesday 13 February 2019

Finding 2nd order polygon neighbors (and 3rd, 4th etc.) using ArcGIS for Desktop?



I have a shapefile of contiguous polygons and for each pair of polygons, I need to know how many polygons are between them, following an neighboring/bordering approach. The output is likely to be a non-spatial table.


For example, for this group of polygons:


1]


The output would be something like this:


2] and so on...


I can use ArcGIS for Desktop for that.


My idea of solution so far:


A model where, for each polygon, I run Polygon Neighbors (Analysis), merge with all the neighbors and run it again, until all there's only one polygon. However, I have little knowledge on coding/scripting, so I'm unsure on how to build this model exactly and if there's a simpler way.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...