Code for Finding What at the top, bottom, left and right of Polyon

439
3
Jump to solution
06-20-2022 04:02 AM
bilalalamgis
New Contributor II

Dear All,

I have polygon with id I want to find what is the id in the adjacent parcels e.g a polygon has ID 1, ID of polygon to its left is 8 and Right is 2 top no polygon and bottom have 5 as shown in image

Thanks 

bilalalamgis_0-1655722888854.png

 

0 Kudos
1 Solution

Accepted Solutions
bilalalamgis
New Contributor II

Thanks @AndyAnderson for your help. I get the result by using Calculate adjacent field tool.

https://pro.arcgis.com/en/pro-app/2.8/tool-reference/cartography/calculate-adjacent-fields.htm

Thanks and Regards

View solution in original post

0 Kudos
3 Replies
AndyAnderson
Occasional Contributor II

Use the tool Generate Near Table:

https://pro.arcgis.com/en/pro-app/2.8/tool-reference/analysis/generate-near-table.htm

The default behavior should include all adjacent or overlapping polygons, and if you include the parameter argument angle = 'ANGLE', the table will include an angle which you can use to determine direction.

If there are gaps, however, you won’t be able to use the default option Closest but should set the parameter argument search_radius to be somewhat greater than zero.

— Andy

.

bilalalamgis
New Contributor II

Thanks @AndyAnderson for your help. I get the result by using Calculate adjacent field tool.

https://pro.arcgis.com/en/pro-app/2.8/tool-reference/cartography/calculate-adjacent-fields.htm

Thanks and Regards

0 Kudos
AndyAnderson
Occasional Contributor II

That’s cool, wouldn’t expect to find that in the Cartography tool box. One caveat, though, it doesn’t appear that it will find every adjacent polygon, and a given polygon might be listed more than once.

— Andy

0 Kudos