Skip to main content
Solved

Calculating the number of polygons touching one polygon


mygis
Supporter
Forum|alt.badge.img+14
  • Supporter

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.

View original
Did this help you find an answer to your question?

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+19
  • 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
erik_jan wrote:

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

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings