1.0.0 • Published 4 years ago
gpx-to-roads v1.0.0
GPX to Roads
Get time and distance spent on each road from a .gpx file. Written in NodeJS.
How to use
- Install on your machine using
npm
:
npm install -g gpx-to-roads
- Download a map file from OpenStreetMap using their export tool.
- Use the following command:
gpx-to-roads <gpx file> <map data>
Example:
gpx-to-roads input.gpx map.osm
{
"Some Street": {"distance": 30, "time": 14000}
"Another Street": {"distance": 60, "time": 40000}
}
Result is returned in JSON. distance
is in meters and time
is in milliseconds.
Performance
This tool wasn't written with performance in mind. It will most likely struggle with larger GPX files and/or map data.
PRs to improve performance are extremely welcome!
1.0.0
4 years ago