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
  • 73 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

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.

1 reply

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • 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