A map matching library
Project description
My implementation of the map matching algorithm from this article (Althought with some modifications). 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.
Setup
You’ll need python 3.5+ and a redis server running. The usage of a virtual environment is recommended.
Install from pypi:
$ pip install mapmatching
Or install from source:
$ cd mapmatching
$ python setup.py install
Usage
Download data from OpenStreetMaps:
$ mapmatching download -h
$ mapmatching download -96.99107360839844 19.441181182861328 -96.846435546875 19.59616470336914 -o streets.json
And load it to redis, by default it loads it to database 1 instead of redis default of 0.
$ mapmatching load streets.json
The two previous commands can be chained:
$ mapmatching download -96.99107360839844 19.441181182861328 -96.846435546875 19.59616470336914 | mapmatching load
Then run the match task with a geojson file with a single gps track. A sample track that works with the sample bounding box is contained in the data/ directory of the repository.
$ mapmatching match -h
$ mapmatching match data/route.geojson -o output.json
Optionally visualize it in the browser:
$ pip install geojsonio
$ geojsonio output.json
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mapmatching-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0c63a976deba4b70dedd69078b4a8e585020fd91870c4f8a93760b26d7b8cab |
|
MD5 | 54f1c596e291c3572c2387a09d6f5304 |
|
BLAKE2b-256 | 13952c08e51e599dcfe6a9f3ab29810cd63b50722bd0bc77881af973753588ab |