NREL / mappymatch

Pure-python package for map matching
http://mappymatch.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
58 stars 19 forks source link

Bugfix/nearest road #130

Closed nreinicke closed 2 years ago

nreinicke commented 2 years ago

Implements a bugfix in which the NxMap.nearest_road was in fact not returning the nearest road. To fix, I've added a buffer around the point when querying the rtree for nearby roads and then explicitly computing the distance between each road and the coordinate and returning the minimum distance.

This also removes the computation of both shortest distance paths and shortest time paths for the LCSS matcher as it was found that they are the same in almost all cases.

jhoshiko commented 2 years ago

Nice, this looks good. Thanks for fixing this!