Skip to main content
Solved

Calculating the number of polygons touching one polygon

  • May 26, 2016
  • 3 replies
  • 135 views

mygis
Supporter
Forum|alt.badge.img+14

Hi,

 

I was wondering what would be the best way to find the number of adjacent polygon of a single feature polygon in the same dataset such as shapefile for instance. I tried the SpatialRelator and connecting the same features in the supplier and requestor bu the results are not correct. Thanks.

Best answer by erik_jan

Another option would be the NeighborFinder with a distance of 0. This will allow you to get a list of closest candidates (all touching (or overlapping) polygons. If you have all as candidate, be sure to substract 1 from the count as the polygon itself will also qualify.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • May 26, 2016

Have you tried to use an AnchoredSnapper before the SpatialRelator? Make sure to use Segment Snapping.


erik_jan
Contributor
Forum|alt.badge.img+23
  • Contributor
  • Best Answer
  • May 26, 2016

Another option would be the NeighborFinder with a distance of 0. This will allow you to get a list of closest candidates (all touching (or overlapping) polygons. If you have all as candidate, be sure to substract 1 from the count as the polygon itself will also qualify.


mygis
Supporter
Forum|alt.badge.img+14
  • Author
  • Supporter
  • May 27, 2016

Another option would be the NeighborFinder with a distance of 0. This will allow you to get a list of closest candidates (all touching (or overlapping) polygons. If you have all as candidate, be sure to substract 1 from the count as the polygon itself will also qualify.

Hi @erik_jan thanks, that is correct, I added a listElementCounter to get the numbers right. Polygons with no numbers are rejected, but that it no issue.

 

neighborfinder.jpg