My implementation of the map matching algorithm from this article. The goal is to get the streets from a gps track.
This is how it looks like: The gray line is the gps trace and the colored lines describe the map-matched most-likely route in the streets for the vehicle.
For reference read the resulting article.
Install:
- python3
- redis >= 3.2.0
Download the data using the overpass api, there is a simple curl command to do that in the overpass/
folder:
$ cd overpass/
$ ./get_street_graph.sh
Install python dependencies. You may want to put them inside a virtualenv:
$ pip install -r requirements.py
Upload the street graph to redis:
$ ./main.py loaddata
Load the lua scripts:
$ ./main.py loadlua
run the mapmatching task with a geojson file with a single gps track and a number indicating how many points of the input gps track to process. Use a very hight number if you want the whole route processed
$ ./main.py mapmatching data/route.geojson 5