by bazzargh · 10y ago · 0 comments
I've written some code to deal with this before (in my case, I wrote a distributed timer for cycle races, predicting current rider locations and gaps from sparse user reports). For me, finding nearest point on the segments of the polyline worked, but choosing only vertices would have made the time estimates terrible. Were the points somehow more fixed than that, eg towns/motels on the route?
Here is why performance mattered in my case.
I needed to predict future positions of the cyclist (see https://www.ibm.com/developerworks/community/blogs/jfp/entry...). The computation relied mostly on weather forecasts provided for each track points.
I then needed to know where to start my computation, i.e. find the track point closest to the current location of the cyclist.