Question

Snapping point to lines and considering consecutive


Badge +1

Hi all,

I have GPS coordinate as input and I would like to snap them to the closest lines, which works perfect with combination of Neighborfinder. However, While finding the closest, I would like to consider the consecutive points as well.

In the images, I have group the GPS point based on timeseries. So if the points have the same color, there are in the same time series. As you can see the closest line for some of the points are different then consecutive points. How can I include the group of consecutive points while finding the closest line to the point?

Thanks in advance.

 

 


4 replies

Userlevel 2
Badge +17

A possible way I can think of is:

  1. Aggregator: create multpoint features from the points for each time series group.
  2. NeighborFinder (1): send the multipoints to the Base port, send the lines to Candidate port, to merge ID of the closest line to each multipoint. If the lines don't have unique ID attribute, use the Counter to add sequential number as a temporary ID to them beforehand.
  3. Deaggregator: deaggregate the mltipoints output from the Matched port. Here, all the points belonging to the same time series group would have the same line ID closest to the group.
  4. NeighborFinder (2): find the closest point on the closest line for each point, grouping by the line ID.

Hope this helps.

Badge +1

Thank you very much. It is very very helpful. May i ask how NeighborFinder identifies the closest line to multipoint? Does it take into account the middle points or average?

 

Userlevel 2
Badge +17

Thank you very much. It is very very helpful. May i ask how NeighborFinder identifies the closest line to multipoint? Does it take into account the middle points or average?

 

I think that the NeighborFinder identifies the closest line to a multipoint based on the distance between a candidate line and a point belonging to the multipoint closest to the line.

Badge +2

@jugoslaviaa or try LineBuilder to create a line from each time series and then Matcher (2019) that has the new Fréchet distance algorithm.

Reply