Skip to main content
Solved

Find Max and Min distance from polygons


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.

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

5 replies

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • 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
Influencer
  • 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
takashi wrote:

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?

 

 


danilo_fme wrote:

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
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • July 12, 2021
alexanderallan wrote:

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


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