tkrajina / gpxpy

gpx-py is a python GPX parser. GPX (GPS eXchange Format) is an XML based file format for GPS tracks.
Apache License 2.0
987 stars 223 forks source link

Add GPXTrack.get_nearest_locations method #273

Open pleasantone opened 6 months ago

pleasantone commented 6 months ago

get_nearest_locations works just across the entire GPX database, which is fine for some uses, but if one is trying to match up all the waypoints against tracks (which could be used for an individual part of a trip), there is no way to just match against a track.

Luckily the fix is trivial, unfortunately it is cut-and-paste since we don't inherit from a more generic track vs tracks object.

This pull request also includes #272, please don't apply both. Just giving you the option to decide if you want the added functionality or just the bug fix