lordsutch / osm-makeroads

R code to "average" GPS traces from OpenStreetMap to derive usable GPX tracks for roadways

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Look into improving the algorithm

lordsutch opened this issue · comments

As noted at the link below, there is more information than just the points we could be using - particularly if we just use tracks rather than the point cloud: "The problem is: while classical Principal Curves Analysis consider the point set to have independent points, I believe it would be more appropriate to consider each track to be composed of dependent vectors."

https://stats.stackexchange.com/questions/69329/can-i-use-principal-curves-analysis-to-fit-a-vector-cloud-instead-of-a-point-clo

Rather than the best spline that will fit a point cloud, what we want is the best spline that fits the relevant track splines.

Essentially (as I'm thinking about it): in any given area, there are k true lines, each of which is represented with error by one or more (partial or complete) tracks. The tracks have two main components of error: measurement error due to the inaccuracy of the GPS fix (which has random and systematic components - hopefully mostly random), and systematic error (that changes somewhat over time) due to vehicle positioning relative to the centerline of the carriageway (in BrEng): lane changes, position of the GPS module within the vehicle, etc.

Not entirely sure how we do this.

We also need to weight using hdop if available (recorded by some GPSes, not by others).