Solved

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

  • 25 November 2022
  • 1 reply
  • 3 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?

icon

Best answer by ebygomm 25 November 2022, 13:05

View original

1 reply

Userlevel 1
Badge +10

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

Reply