Skip to main content
Solved

Create all lines between points A and points B if the distance between them is < 500 meter.

  • November 25, 2022
  • 1 reply
  • 55 views

I have two sets of points, A and B. I would like to create lines between them, only if the distance of this line is < 500 meter.

 

Currently I achieve this using a 1-on-1 join in the FeatureMerger. For each point in A there is a list element with the coordinates stored for point B.

 

So if I have 300 points of A and 200 of B, I would have a list with 300 features, with each feature having 200 elements.

 

I then explode the list, and then for each point of B, create the feature, and then check if the distance is <500 meter. This is unfortunately very bad performance-wise, since there are a lot of unneeded connections (> 500m) being made. When running the workspace with big sets of points in A and B this can really effect efficiency.

 

Is there a way in which I can check the distance between two points before I create the feature?

Best answer by ebygomm

Take a look at the neighbourfinder, you can then set a maximum distance of 500m so that only those points that are within 500m are added to a list

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

1 reply

ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • Best Answer
  • November 25, 2022

Take a look at the neighbourfinder, you can then set a maximum distance of 500m so that only those points that are within 500m are added to a list


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