Skip to main content

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 !

 

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


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 


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


Reply