Skip to main content
Gitter GitHub stars GitHub contributors GNU GPL v3 Build Status

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:

Output of the example run

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

Metadata

Release files for mapmatching 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mapmatching 0.1.5
File Size Uploaded
mapmatching-0.1.5.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mapmatching 0.1.5
File Interpreter ABI Platform
mapmatching-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 39.1 kB

Release files / mapmatching-0.1.5.tar.gz

Download URL mapmatching-0.1.5.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6e19fa2d78d4aa54b73f951891236edd1b940113492e350c42d137e6f6b8af26
BLAKE2b-256 checksum
How to use checksums
7604ca36dc30bbf2e6f4355d10cfdc7ed77c83c1f05ce4d104ab8d3bd154bf00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

Release files / mapmatching-0.1.5-py3-none-any.whl

Download URL mapmatching-0.1.5-py3-none-any.whl
Size 27.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c2e60e8e17afdcdc304d45d562c77ef8d4a0e837a9bcde1184e1819552f3557
BLAKE2b-256 checksum
How to use checksums
6aeb331f085d0fb3056d5e83b33d0e8bb527d693aa1e0eff86e36e07ab68d756
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page