Solved

Delete points below a distance from every point within a dataset

  • 10 January 2023
  • 3 replies
  • 79 views

Badge

Hello,

I have a point dataset and I want to make an algorithm that operates like this:

(1) Select a point;

(2) Remove all surrounding points within a distance, entered as a fixed parameter (eventually this can be done using a bufferer + spatial filter);

(3) Store the first initial point in a new dataset and repeat the process for the remaining dataset from step (2) to obtain a second point that will be stored with the first one and so on

The final result is to obtain a point dataset where no distance below a threshold exist ALONG WITH preserving the maximum number possible of points

Thank you very much in advance !

 

icon

Best answer by ctredinnick 11 January 2023, 09:33

View original

3 replies

Userlevel 3
Badge +16

At a basic level, you can achieve that with the transformer attached. It selects a random point, excludes the points near to it, and loops back around with those which were outside of that distance to be retried until there are none left.

imageI generated a random set of points (below), it does a good job with it, they're all relatively evenly spaced. It doesn't achieve the goal of preserving the max number of points though. Maybe you can iterate to get a higher number, maybe there is an algorithm to do it, but given that the ShortestPathFinder performs random iterations until it stops improving, I suspect this may require the same approach.image

Badge

Thank you for the answer, I have tried this custom transform, however, I was getting the message errors in the attached log file along with a snapshot from the workspace.

Screenshot 2023-01-11 114423 

Badge

Apparently, it was a problem with the user parameters and i fixed it. Thank you very much !

Reply