Skip to main content
Solved

Find Max and Min distance from polygons

  • July 13, 2018
  • 5 replies
  • 265 views

mr_fme
Enthusiast
Forum|alt.badge.img+9

I have 2 shapefile files, each have about 13,000 features. I need to know what the minimum and maximum distance each feature of file 1 for example has in relation to file 2. How to do that?

Best answer by takashi

Hi @mr_fme, you can get the minimum distance between two polygon datasets easily using the NeighborFinder, but getting the maximum distance may not be so easy. Hope this workflow would work as expected.

In this figure, the blue polygons and the red polygons represent two polygon datasets. The workflow above selects the largest one in all minimum spanning circles for every pair of red polygon and blue polygon. The diameter of the circle is the maximum distance between the two polygon datasets.

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.

5 replies

danilo_fme
Celebrity
Forum|alt.badge.img+52
  • Celebrity
  • July 13, 2018

Hi @mr_fme

 

The transformer NeighborFinder generate a new list of attribute: _distance.

After I think you can use the ListStatisticsCalculator and You'll receive the results max and Min.

Thanks,

Danilo

 


takashi
Celebrity
  • Best Answer
  • July 14, 2018

Hi @mr_fme, you can get the minimum distance between two polygon datasets easily using the NeighborFinder, but getting the maximum distance may not be so easy. Hope this workflow would work as expected.

In this figure, the blue polygons and the red polygons represent two polygon datasets. The workflow above selects the largest one in all minimum spanning circles for every pair of red polygon and blue polygon. The diameter of the circle is the maximum distance between the two polygon datasets.


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • July 16, 2018

Hi @mr_fme, you can get the minimum distance between two polygon datasets easily using the NeighborFinder, but getting the maximum distance may not be so easy. Hope this workflow would work as expected.

In this figure, the blue polygons and the red polygons represent two polygon datasets. The workflow above selects the largest one in all minimum spanning circles for every pair of red polygon and blue polygon. The diameter of the circle is the maximum distance between the two polygon datasets.

I really enjoyed your suggestion, but the neighbor has a layout called _distance, I can see the distance from I organize the column ascedentemente. Does my location have a distance greater than one polygon to another?

 

 


Hi @mr_fme

 

The transformer NeighborFinder generate a new list of attribute: _distance.

After I think you can use the ListStatisticsCalculator and You'll receive the results max and Min.

Thanks,

Danilo

 

This worked for me, a good solution when you have multiple bases and multiple candidates to then use the min and max distance . Was thinking about aggregator and centre point replacer to get an average for the candidate (to get one candidate for many bases) but this is far better option!


danilo_fme
Celebrity
Forum|alt.badge.img+52
  • Celebrity
  • July 12, 2021

This worked for me, a good solution when you have multiple bases and multiple candidates to then use the min and max distance . Was thinking about aggregator and centre point replacer to get an average for the candidate (to get one candidate for many bases) but this is far better option!

Thanks for reply