Select to view content in your preferred language

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

789
3
Jump to solution
06-20-2022 04:02 AM
bilalalamgis
Occasional Contributor

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
Occasional Contributor

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
Frequent Contributor

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
Occasional Contributor

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
Frequent Contributor

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