All Projects → graphhopper → Map Matching

graphhopper / Map Matching

Licence: apache-2.0
The map matching functionality is now located in the main repository https://github.com/graphhopper/graphhopper#map-matching

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Map Matching

trackanimation
Track Animation is a Python 2 and 3 library that provides an easy and user-adjustable way of creating visualizations from GPS data.
Stars: ✭ 74 (-88.87%)
Mutual labels:  tracking, openstreetmap, gps
Atlas
🌎 Atlas is a set of APIs for looking up information about locations
Stars: ✭ 21 (-96.84%)
Mutual labels:  gps, geospatial
LightOSM.jl
A Julia package for downloading and analysing geospatial data from OpenStreetMap APIs.
Stars: ✭ 32 (-95.19%)
Mutual labels:  openstreetmap, geospatial
Peanuts
Peanuts is a free and open source wifi tracking tool. Based on the SensePosts Snoopy-NG project that is now closed.
Stars: ✭ 34 (-94.89%)
Mutual labels:  tracking, gps
Opentracks
OpenTracks is a sport tracking application that completely respects your privacy.
Stars: ✭ 225 (-66.17%)
Mutual labels:  gps, tracking
Maps
🌍🌏🌎 The whole world fits inside your cloud!
Stars: ✭ 253 (-61.95%)
Mutual labels:  gps, tracking
orange3-geo
🍊 🌍 Orange add-on for dealing with geography and geo-location
Stars: ✭ 22 (-96.69%)
Mutual labels:  openstreetmap, gps
Openrailwaymap
An OpenStreetMap-based project for creating a map of the world's railway infrastructure.
Stars: ✭ 150 (-77.44%)
Mutual labels:  geospatial, openstreetmap
Osmnx
OSMnx: Python for street networks. Retrieve, model, analyze, and visualize street networks and other spatial data from OpenStreetMap.
Stars: ✭ 3,357 (+404.81%)
Mutual labels:  geospatial, openstreetmap
Graphhopper
Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.
Stars: ✭ 3,457 (+419.85%)
Mutual labels:  geospatial, openstreetmap
Fmm
Fast map matching, an open source framework in C++
Stars: ✭ 359 (-46.02%)
Mutual labels:  gps, openstreetmap
Find Maraudersmap
Internal positioning for everyone, in the style of Harry Potter
Stars: ✭ 62 (-90.68%)
Mutual labels:  gps, tracking
Geomancer
Automated feature engineering for geospatial data
Stars: ✭ 194 (-70.83%)
Mutual labels:  geospatial, openstreetmap
Barefoot
Java map matching library for integrating the map into software and services with state-of-the-art online and offline map matching that can be used stand-alone and in the cloud.
Stars: ✭ 541 (-18.65%)
Mutual labels:  tracking, openstreetmap
Atlas
OSM in memory
Stars: ✭ 172 (-74.14%)
Mutual labels:  geospatial, openstreetmap
Navit
The open source (GPL v2) turn-by-turn navigation software for many OS
Stars: ✭ 368 (-44.66%)
Mutual labels:  gps, openstreetmap
Urbansprawl
Open framework for calculating spatial urban sprawl indices and performing disaggregated population estimates using open data
Stars: ✭ 48 (-92.78%)
Mutual labels:  geospatial, openstreetmap
Kepler
The open source full-stack geosocial network platform
Stars: ✭ 125 (-81.2%)
Mutual labels:  geospatial, openstreetmap
addon-traccar
Traccar - Home Assistant Community Add-ons
Stars: ✭ 65 (-90.23%)
Mutual labels:  tracking, gps
Blendergis
Blender addons to make the bridge between Blender and geographic data
Stars: ✭ 4,642 (+598.05%)
Mutual labels:  geospatial, openstreetmap

Map Matching based on GraphHopper

Build Status

Snaps GPX traces to the road using the GraphHopper routing engine.

Read more about the map matching problem at Wikipedia.

See the demo in action (black is GPS track, green is matched result):

map-matching-example

License

Apache License 2.0

Discussion

Our web forum is here.

Usage

Java 8 and Maven >=3.3 are required.

Build:

mvn package -DskipTests

Then you need to import an OSM map for the area you want to do map-matching on, e.g. the provided sample data:

java -jar matching-web/target/graphhopper-map-matching-web-3.0-SNAPSHOT.jar import map-data/leipzig_germany.osm.pbf

OpenStreetMap data in pbf or xml format are available from here.

The optional parameter --vehicle defines the routing profile like car, bike, motorcycle or foot. You can also provide a comma separated list. For all supported values see the variables in the FlagEncoderFactory of GraphHopper.

Before re-importing, you need to delete the graph-cache directory, which is created by the import.

Now you can match GPX traces against the map:

java -jar matching-web/target/graphhopper-map-matching-web-3.0-SNAPSHOT.jar match matching-web/src/test/resources/*.gpx

If you were using multiple vehicles for the import you can use --vehicle to select one of them, otherwise the first one will be used.

Web app

Start via:

java -jar matching-web/target/graphhopper-map-matching-web-3.0-SNAPSHOT.jar server config.yml

Access the simple UI via localhost:8989.

You can post GPX files and get back snapped results as GPX or as compatible GraphHopper JSON. An example curl request is:

curl -XPOST -H "Content-Type: application/gpx+xml" -d @matching-web/src/test/resources/test1.gpx "localhost:8989/match?vehicle=car&type=json"

Tools

Determine the bounding box of one or more GPX files:

java -jar matching-web/target/graphhopper-map-matching-web-3.0-SNAPSHOT.jar getbounds matching-web/src/test/resources/*.gpx

Java usage

Have a look at MapMatchingResource.java to see how the web service is implemented on top of library functions to get an idea how to use map matching in your own project.

Use this Maven dependency:

<dependency>
    <groupId>com.graphhopper</groupId>
    <artifactId>graphhopper-map-matching-core</artifactId>
    <version>3.0-SNAPSHOT</version>
</dependency>

Note

Note that the edge and node IDs from GraphHopper will change for different PBF files, like when updating the OSM data.

About

The map matching algorithm mainly follows the approach described in

Newson, Paul, and John Krumm. "Hidden Markov map matching through noise and sparseness." Proceedings of the 17th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems. ACM, 2009.

This algorithm works as follows. For each input GPS position, a number of map matching candidates within a certain radius around the GPS position is computed. The Viterbi algorithm as provided by the hmm-lib is then used to compute the most likely sequence of map matching candidates. Thereby, the distances between GPS positions and map matching candidates as well as the routing distances between consecutive map matching candidates are taken into account. The GraphHopper routing engine is used to find candidates and to compute routing distances.

Before GraphHopper 0.8, this faster but more heuristic approach was used.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].