Coder Social home page Coder Social logo

graphhopper / map-matching Goto Github PK

View Code? Open in Web Editor NEW
781.0 62.0 277.0 9.15 MB

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

Home Page: https://www.graphhopper.com/open-source/

License: Apache License 2.0

HTML 0.74% JavaScript 13.06% CSS 4.73% Java 81.47%
geospatial java gps map-matching tracking openstreetmap

map-matching's Introduction

GraphHopper Routing Engine

Build Status

GraphHopper is a fast and memory-efficient routing engine released under Apache License 2.0. It can be used as a Java library or standalone web server to calculate the distance, time, turn-by-turn instructions and many road attributes for a route between two or more points. Beyond this "A-to-B" routing it supports "snap to road", Isochrone calculation, mobile navigation and more. GraphHopper uses OpenStreetMap and GTFS data by default and it can import other data sources too.

Community

We have an open community and welcome everyone. Let us know your problems, use cases or just say hello. Please see our community guidelines.

Questions

All questions go to our forum where we also have subsections specially for developers, mobile usage, and our map matching component. You can also search Stackoverflow for answers. Please do not use our issue section for questions :)

Contribute

Read through how to contribute for information on topics like finding and fixing bugs and improving our documentation or translations! We even have good first issues to get started.

Get Started

To get started you can try GraphHopper Maps, read through our documentation and install the GraphHopper Web Service locally.

Click to see older releases

Installation

To install the GraphHopper Maps UI and the web service locally you need a JVM (>= Java 17) and do:

wget https://repo1.maven.org/maven2/com/graphhopper/graphhopper-web/8.0/graphhopper-web-8.0.jar https://raw.githubusercontent.com/graphhopper/graphhopper/8.x/config-example.yml http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
java -D"dw.graphhopper.datareader.file=berlin-latest.osm.pbf" -jar graphhopper*.jar server config-example.yml

After a while you see a log message with 'Server - Started', then go to http://localhost:8989/ and you'll see a map of Berlin. You should be able to right click on the map to create a route.

See the documentation that contains e.g. the elevation guide and the deployment guide.

Docker

The Docker images created by the community from the master branch can be found here (currently daily). See the Dockerfile for more details.

GraphHopper Maps

To see the road routing feature of GraphHopper in action please go to GraphHopper Maps.

GraphHopper Maps

GraphHopper Maps is an open source user interface, which you can find here. It can use this open source routing engine or the GraphHopper Directions API, which provides the Routing API, a Route Optimization API (based on jsprit), a fast Matrix API and an address search (based on photon). The photon project is also supported by the GraphHopper GmbH. Additionally to the GraphHopper Directions API, map tiles from various providers are used where the default is Omniscale.

All this is available for free, via encrypted connections and from German servers for a nice and private route planning experience!

Public Transit

Get started

Realtime Demo

Mobile Apps

Online

There is a web service that can be consumed by our navigation Android client.

android navigation demo app

Offline

Offline routing is no longer officially supported but should still work. See version 1.0 with still an Android demo and this pull request of the iOS fork including a demo for iOS.

simple routing

Analysis

Use isochrones to calculate and visualize the reachable area for a certain travel mode

Isochrone API image

high precision reachability image

To support these high precision reachability approaches there is the /spt endpoint (shortest path tree). See #1577

There is the map matching subproject to snap GPX traces to the road.

map-matching-example

Technical Overview

GraphHopper supports several routing algorithms, such as Dijkstra and A* and its bidirectional variants. Furthermore, it allows you to use Contraction Hierarchies (CH) very easily. We call this speed mode; without this CH preparation, we call it flexible mode.

The speed mode comes with very fast and lightweight (less RAM) responses and it does not use heuristics. However, only predefined vehicle profiles are possible and this additional CH preparation is time and resource consuming.

Then there is the hybrid mode which also requires more time and memory for the preparation, but it is much more flexible regarding changing properties per request or e.g. integrating traffic data. Furthermore, this hybrid mode is slower than the speed mode, but it is an order of magnitude faster than the flexible mode and uses less RAM for one request.

If the preparations exist you can switch between all modes at request time.

Read more about the technical details here.

License

We chose the Apache License to make it easy for you to embed GraphHopper in your products, even closed source. We suggest that you contribute back your changes, as GraphHopper evolves fast.

OpenStreetMap Support

OpenStreetMap is directly supported by GraphHopper. Without the amazing data from OpenStreetMap, GraphHopper wouldn't be possible at all. Other map data will need a custom import procedure, see e.g. Ordnance Survey, Shapefile like ESRI or Navteq.

Written in Java

GraphHopper is written in Java and officially runs on Linux, Mac OS X and Windows.

Maven

Embed GraphHopper with OpenStreetMap support into your Java application via the following snippet:

<dependency>
    <groupId>com.graphhopper</groupId>
    <artifactId>graphhopper-core</artifactId>
    <version>[LATEST-VERSION]</version>
</dependency>

See our example application to get started fast.

Customizable

You can customize GraphHopper with Java knowledge (with a high and low level API) and also without Java knowledge using the custom models.

Web API

With the web module, we provide code to query GraphHopper over HTTP and decrease bandwidth usage as much as possible. For that we use an efficient polyline encoding, the Ramer–Douglas–Peucker algorithm, and a simple GZIP servlet filter.

On the client side, we provide a Java and JavaScript client.

Desktop

GraphHopper also runs on the Desktop in a Java application without internet access. For debugging purposes GraphHopper can produce vector tiles, i.e. a visualization of the road network in the browser (see #1572). Also a more low level Swing-based UI is provided via MiniGraphUI in the tools module, see some visualizations done with it here. A fast and production ready map visualization for the Desktop can be implemented via mapsforge or mapsforge vtm.

Features

Here is a list of the more detailed features:

  • Works out of the box with OpenStreetMap (osm/xml and pbf) and can be adapted to custom data
  • OpenStreetMap integration: stores and considers road type, speed limit, the surface, barriers, access restrictions, ferries, conditional access restrictions, ...
  • GraphHopper is fast. And with the so called "Contraction Hierarchies" it can be even faster (enabled by default).
  • Memory efficient data structures, algorithms and the low and high level API is tuned towards ease of use and efficiency
  • Pre-built routing profiles: car, bike, racing bike, mountain bike, foot, hike, motorcycle, ...
  • Customization of these profiles are possible and e.g. get truck routing or support for cargo bikes and many other changes
  • Provides a powerful web API that exposes the data from OpenStreetMap and allows customizing the vehicle profiles per request. With JavaScript and Java clients.
  • Does map matching
  • Supports public transit routing and GTFS.
  • Offers turn instructions in more than 45 languages, contribute or improve here
  • Displays and takes into account elevation data
  • Alternative routes
  • Turn costs and restrictions
  • Country specific routing via country rules
  • Allows customizing routing behavior using custom areas
  • The core uses only a few dependencies (hppc, jts, janino and slf4j)
  • Scales from small indoor-sized to world-wide-sized graphs
  • Finds nearest point on street e.g. to get elevation or 'snap to road' or being used as spatial index (see #1485)
  • Calculates isochrones and shortest path trees
  • Shows the whole road network in the browser for debugging purposes ("vector tile support") #1572
  • Shows details along a route like road_class or max_speed ("path details") #1142
  • Written Java and simple start for developers via Maven.

map-matching's People

Contributors

1kastner avatar chucre avatar devemux86 avatar easbar avatar hbruch avatar karussell avatar kodonnell avatar michaz avatar nakaner avatar rockwellw avatar stefanholder avatar tochev avatar tyrasd avatar ustroetz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

map-matching's Issues

Problem with file .\track-data\*.gpx Error: Cannot find matching path! Wrong vehicle car or missing OpenStreetMap data? Try to increase maxSearchMultiplier

Hello,

I installed the map-matching some days ago and i'm trying to run it on different GPX files of GPS bike data. Some of them work and i get good results some others don't and i'm getting the following error:
"Problem with file .\track-data*.gpx Error: Cannot find matching path! Wrong vehicle car or missing OpenStreetMap data? Try to increase maxSearchMultiplier=100.0"

Even though i set my vehicle to be a bike.
I tried to set the maxSearchMultiplier to 100.0 and it didn't work.
I don't know whats wrong and i couldn't debug the whole algorithm.

Is there any restrictions on the GPX files? Am i missing something here?

Thanks for your help.

findNClosest fails for large measurementErrorSigma

Just something I noticed while trying to understand findNClosest (as I'll be refactoring it for another use) - it won't find all matches if measurementErrorSigma is too large. That is, it will at most only ever find all matches within +- deltaLat/deltaLon.

Not sure if this is intended behaviour or an actual bug. If it is a bug, I think it should be a simple fix to replace

for (int iteration = 0; iteration < 2; iteration++) {
    // should we use the return value of earlyFinish?
    index.findNetworkEntries(queryLat, queryLon, set, iteration);

with

while (!index.findNetworkEntries(queryLat, queryLon, set, iteration))

(from here).

Failue in case that the very last two points of a track have exactly the same location

One of my tracks contains two exactly same located waypoints at the very end of the track. In this case the algortihm fails. I have made a test and a hack solution which solves this case, see

992998d

This hack solves the problem I had. I didn't test if two consecutive nodes at an arbitrary location somewhere in between the first and the last waypoint of a track would be also a problem and if the change would work in such a case.

Date import fails

After cloning , I tried running following :
./map-matching.sh action=import datasource=/home/harshit.sharma/random.osm

LocationIndexMatch.java:[67,31] error: method findNetworkEntries in class LocationIndexTree cannot be applied to given types.

Following is stacktrace:
ls: cannot access target/map-matching-*-dependencies.jar: No such file or directory
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GraphHopper Map Matching 0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ map-matching ---
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ map-matching ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ map-matching ---
[INFO] Compiling 6 source files to /home/harshitsharma/map-matching/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.117s
[INFO] Finished at: Fri Aug 07 16:24:45 IST 2015
[INFO] Final Memory: 12M/143M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project map-matching: Compilation failure
[ERROR] /home/harshitsharma/map-matching/src/main/java/com/graphhopper/matching/LocationIndexMatch.java:[67,31] error: method findNetworkEntries in class LocationIndexTree cannot be applied to given types;
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Error: Unable to access jarfile action=import

Cannot extract path - no edges returned

I am get this error for the file posted below:

2015-04-02 12:50:16,920 [main] INFO  com.graphhopper.matching.MapMatchingMain - loading graph from cache
2015-04-02 12:50:17,043 [main] INFO  com.graphhopper.matching.MapMatchingMain - Setup lookup index. Accuracy filter is at 15m
2015-04-02 12:50:17,048 [main] INFO  com.graphhopper.matching.MapMatchingMain - Now processing 1 files
gps import took:0.063660115s, match took: 0.5550446
2015-04-02 12:50:17,667 [main] ERROR com.graphhopper.matching.MapMatchingMain - Problem with file /Users/ustroetz/Downloads/test.gpx Error: Cannot extract path - no edges returned? 9, [1267-9365  -33.470600025404266,-70.67163408976633,NaN], [1267-9365  -33.470600025404266,-70.67163408976633,NaN, 1267-9319  -33.470646940833944,-70.67162938581463,NaN, 1267-9317  -33.47064704009847,-70.67163353424445,NaN, 36597-1267  -33.47064704009847,-70.67163353424445,NaN]

I am using the santiago_chile metro extracts. Any ideas what might be the reason?

The sample file:

<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/1/0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd" creator="gpx.py -- https://github.com/tkrajina/gpxpy">
   <trk>
      <name />
      <type />
      <desc />
      <trkseg>
         <trkpt lat="-33.4617" lon="-70.623482">
            <time>2015-04-02T12:25:56Z</time>
         </trkpt>
         <trkpt lat="-33.461948" lon="-70.623413">
            <time>2015-04-02T12:25:57Z</time>
         </trkpt>
         <trkpt lat="-33.462002" lon="-70.623352">
            <time>2015-04-02T12:25:58Z</time>
         </trkpt>
         <trkpt lat="-33.462109" lon="-70.623383">
            <time>2015-04-02T12:25:59Z</time>
         </trkpt>
         <trkpt lat="-33.462601" lon="-70.623238">
            <time>2015-04-02T12:26:00Z</time>
         </trkpt>
         <trkpt lat="-33.46278" lon="-70.623108">
            <time>2015-04-02T12:26:01Z</time>
         </trkpt>
         <trkpt lat="-33.46278" lon="-70.623108">
            <time>2015-04-02T12:26:02Z</time>
         </trkpt>
         <trkpt lat="-33.46283" lon="-70.623169">
            <time>2015-04-02T12:26:03Z</time>
         </trkpt>
         <trkpt lat="-33.463661" lon="-70.62294">
            <time>2015-04-02T12:26:04Z</time>
         </trkpt>
         <trkpt lat="-33.463749" lon="-70.622864">
            <time>2015-04-02T12:26:05Z</time>
         </trkpt>
         <trkpt lat="-33.463921" lon="-70.622871">
            <time>2015-04-02T12:26:06Z</time>
         </trkpt>
         <trkpt lat="-33.464409" lon="-70.622726">
            <time>2015-04-02T12:26:07Z</time>
         </trkpt>
         <trkpt lat="-33.4645" lon="-70.62265">
            <time>2015-04-02T12:26:08Z</time>
         </trkpt>
         <trkpt lat="-33.464642" lon="-70.622673">
            <time>2015-04-02T12:26:09Z</time>
         </trkpt>
         <trkpt lat="-33.46526" lon="-70.622498">
            <time>2015-04-02T12:26:10Z</time>
         </trkpt>
         <trkpt lat="-33.465439" lon="-70.622383">
            <time>2015-04-02T12:26:11Z</time>
         </trkpt>
         <trkpt lat="-33.4655" lon="-70.622421">
            <time>2015-04-02T12:26:12Z</time>
         </trkpt>
         <trkpt lat="-33.46637" lon="-70.622192">
            <time>2015-04-02T12:26:13Z</time>
         </trkpt>
         <trkpt lat="-33.466511" lon="-70.62207">
            <time>2015-04-02T12:26:14Z</time>
         </trkpt>
         <trkpt lat="-33.466511" lon="-70.62207">
            <time>2015-04-02T12:26:15Z</time>
         </trkpt>
         <trkpt lat="-33.46664" lon="-70.622124">
            <time>2015-04-02T12:26:16Z</time>
         </trkpt>
         <trkpt lat="-33.467281" lon="-70.622063">
            <time>2015-04-02T12:26:17Z</time>
         </trkpt>
         <trkpt lat="-33.467388" lon="-70.621971">
            <time>2015-04-02T12:26:18Z</time>
         </trkpt>
         <trkpt lat="-33.467541" lon="-70.622017">
            <time>2015-04-02T12:26:19Z</time>
         </trkpt>
         <trkpt lat="-33.46859" lon="-70.62191">
            <time>2015-04-02T12:26:20Z</time>
         </trkpt>
         <trkpt lat="-33.468658" lon="-70.621841">
            <time>2015-04-02T12:26:21Z</time>
         </trkpt>
         <trkpt lat="-33.468658" lon="-70.621841">
            <time>2015-04-02T12:26:22Z</time>
         </trkpt>
         <trkpt lat="-33.468681" lon="-70.62191">
            <time>2015-04-02T12:26:23Z</time>
         </trkpt>
         <trkpt lat="-33.469608" lon="-70.621803">
            <time>2015-04-02T12:26:24Z</time>
         </trkpt>
         <trkpt lat="-33.46973" lon="-70.621719">
            <time>2015-04-02T12:26:25Z</time>
         </trkpt>
         <trkpt lat="-33.46973" lon="-70.621719">
            <time>2015-04-02T12:26:26Z</time>
         </trkpt>
         <trkpt lat="-33.469769" lon="-70.621788">
            <time>2015-04-02T12:26:27Z</time>
         </trkpt>
         <trkpt lat="-33.470921" lon="-70.621658">
            <time>2015-04-02T12:26:28Z</time>
         </trkpt>
         <trkpt lat="-33.471069" lon="-70.621567">
            <time>2015-04-02T12:26:29Z</time>
         </trkpt>
         <trkpt lat="-33.471069" lon="-70.621567">
            <time>2015-04-02T12:26:30Z</time>
         </trkpt>
         <trkpt lat="-33.471001" lon="-70.622192">
            <time>2015-04-02T12:26:31Z</time>
         </trkpt>
         <trkpt lat="-33.471081" lon="-70.622704">
            <time>2015-04-02T12:26:32Z</time>
         </trkpt>
         <trkpt lat="-33.471279" lon="-70.623154">
            <time>2015-04-02T12:26:33Z</time>
         </trkpt>
         <trkpt lat="-33.471809" lon="-70.623878">
            <time>2015-04-02T12:26:34Z</time>
         </trkpt>
         <trkpt lat="-33.471809" lon="-70.623878">
            <time>2015-04-02T12:26:35Z</time>
         </trkpt>
         <trkpt lat="-33.47332" lon="-70.623482">
            <time>2015-04-02T12:26:36Z</time>
         </trkpt>
         <trkpt lat="-33.47337" lon="-70.623413">
            <time>2015-04-02T12:26:37Z</time>
         </trkpt>
         <trkpt lat="-33.47337" lon="-70.623413">
            <time>2015-04-02T12:26:38Z</time>
         </trkpt>
         <trkpt lat="-33.473431" lon="-70.623459">
            <time>2015-04-02T12:26:39Z</time>
         </trkpt>
         <trkpt lat="-33.474869" lon="-70.623077">
            <time>2015-04-02T12:26:40Z</time>
         </trkpt>
         <trkpt lat="-33.474918" lon="-70.623009">
            <time>2015-04-02T12:26:41Z</time>
         </trkpt>
         <trkpt lat="-33.474918" lon="-70.623009">
            <time>2015-04-02T12:26:42Z</time>
         </trkpt>
         <trkpt lat="-33.475479" lon="-70.626091">
            <time>2015-04-02T12:26:43Z</time>
         </trkpt>
         <trkpt lat="-33.475479" lon="-70.626091">
            <time>2015-04-02T12:26:44Z</time>
         </trkpt>
         <trkpt lat="-33.4753" lon="-70.626137">
            <time>2015-04-02T12:26:45Z</time>
         </trkpt>
         <trkpt lat="-33.4753" lon="-70.626137">
            <time>2015-04-02T12:26:46Z</time>
         </trkpt>
         <trkpt lat="-33.47617" lon="-70.631149">
            <time>2015-04-02T12:26:47Z</time>
         </trkpt>
         <trkpt lat="-33.477001" lon="-70.63707">
            <time>2015-04-02T12:26:48Z</time>
         </trkpt>
         <trkpt lat="-33.477161" lon="-70.641922">
            <time>2015-04-02T12:26:49Z</time>
         </trkpt>
         <trkpt lat="-33.477161" lon="-70.641922">
            <time>2015-04-02T12:26:50Z</time>
         </trkpt>
         <trkpt lat="-33.477581" lon="-70.641907">
            <time>2015-04-02T12:26:51Z</time>
         </trkpt>
         <trkpt lat="-33.477638" lon="-70.641838">
            <time>2015-04-02T12:26:52Z</time>
         </trkpt>
         <trkpt lat="-33.477638" lon="-70.641838">
            <time>2015-04-02T12:26:53Z</time>
         </trkpt>
         <trkpt lat="-33.477612" lon="-70.648193">
            <time>2015-04-02T12:26:54Z</time>
         </trkpt>
         <trkpt lat="-33.477612" lon="-70.648193">
            <time>2015-04-02T12:26:55Z</time>
         </trkpt>
         <trkpt lat="-33.477558" lon="-70.648529">
            <time>2015-04-02T12:26:56Z</time>
         </trkpt>
         <trkpt lat="-33.47747" lon="-70.648788">
            <time>2015-04-02T12:26:57Z</time>
         </trkpt>
         <trkpt lat="-33.4771" lon="-70.649483">
            <time>2015-04-02T12:26:58Z</time>
         </trkpt>
         <trkpt lat="-33.477001" lon="-70.650063">
            <time>2015-04-02T12:26:59Z</time>
         </trkpt>
         <trkpt lat="-33.476978" lon="-70.651176">
            <time>2015-04-02T12:27:00Z</time>
         </trkpt>
         <trkpt lat="-33.476978" lon="-70.651176">
            <time>2015-04-02T12:27:01Z</time>
         </trkpt>
         <trkpt lat="-33.47683" lon="-70.651978">
            <time>2015-04-02T12:27:02Z</time>
         </trkpt>
         <trkpt lat="-33.47678" lon="-70.652496">
            <time>2015-04-02T12:27:03Z</time>
         </trkpt>
         <trkpt lat="-33.476742" lon="-70.653923">
            <time>2015-04-02T12:27:04Z</time>
         </trkpt>
         <trkpt lat="-33.47683" lon="-70.653999">
            <time>2015-04-02T12:27:05Z</time>
         </trkpt>
         <trkpt lat="-33.47683" lon="-70.653999">
            <time>2015-04-02T12:27:06Z</time>
         </trkpt>
         <trkpt lat="-33.475868" lon="-70.654083">
            <time>2015-04-02T12:27:07Z</time>
         </trkpt>
         <trkpt lat="-33.475868" lon="-70.654083">
            <time>2015-04-02T12:27:08Z</time>
         </trkpt>
         <trkpt lat="-33.47578" lon="-70.65416">
            <time>2015-04-02T12:27:09Z</time>
         </trkpt>
         <trkpt lat="-33.475712" lon="-70.654343">
            <time>2015-04-02T12:27:10Z</time>
         </trkpt>
         <trkpt lat="-33.475712" lon="-70.654343">
            <time>2015-04-02T12:27:11Z</time>
         </trkpt>
         <trkpt lat="-33.47578" lon="-70.65416">
            <time>2015-04-02T12:27:12Z</time>
         </trkpt>
         <trkpt lat="-33.475868" lon="-70.654083">
            <time>2015-04-02T12:27:13Z</time>
         </trkpt>
         <trkpt lat="-33.47683" lon="-70.653999">
            <time>2015-04-02T12:27:14Z</time>
         </trkpt>
         <trkpt lat="-33.477299" lon="-70.653908">
            <time>2015-04-02T12:27:15Z</time>
         </trkpt>
         <trkpt lat="-33.478889" lon="-70.653801">
            <time>2015-04-02T12:27:16Z</time>
         </trkpt>
         <trkpt lat="-33.478889" lon="-70.653801">
            <time>2015-04-02T12:27:17Z</time>
         </trkpt>
         <trkpt lat="-33.47884" lon="-70.653877">
            <time>2015-04-02T12:27:18Z</time>
         </trkpt>
         <trkpt lat="-33.47868" lon="-70.655472">
            <time>2015-04-02T12:27:19Z</time>
         </trkpt>
         <trkpt lat="-33.47868" lon="-70.655472">
            <time>2015-04-02T12:27:20Z</time>
         </trkpt>
         <trkpt lat="-33.47773" lon="-70.655273">
            <time>2015-04-02T12:27:21Z</time>
         </trkpt>
         <trkpt lat="-33.47773" lon="-70.655273">
            <time>2015-04-02T12:27:22Z</time>
         </trkpt>
         <trkpt lat="-33.477859" lon="-70.655251">
            <time>2015-04-02T12:27:23Z</time>
         </trkpt>
         <trkpt lat="-33.47797" lon="-70.655121">
            <time>2015-04-02T12:27:24Z</time>
         </trkpt>
         <trkpt lat="-33.477982" lon="-70.654961">
            <time>2015-04-02T12:27:25Z</time>
         </trkpt>
         <trkpt lat="-33.477798" lon="-70.654732">
            <time>2015-04-02T12:27:26Z</time>
         </trkpt>
         <trkpt lat="-33.47757" lon="-70.654701">
            <time>2015-04-02T12:27:27Z</time>
         </trkpt>
         <trkpt lat="-33.47731" lon="-70.654968">
            <time>2015-04-02T12:27:28Z</time>
         </trkpt>
         <trkpt lat="-33.47731" lon="-70.654968">
            <time>2015-04-02T12:27:29Z</time>
         </trkpt>
         <trkpt lat="-33.477299" lon="-70.653908">
            <time>2015-04-02T12:27:30Z</time>
         </trkpt>
         <trkpt lat="-33.477299" lon="-70.653908">
            <time>2015-04-02T12:27:31Z</time>
         </trkpt>
         <trkpt lat="-33.47683" lon="-70.653999">
            <time>2015-04-02T12:27:32Z</time>
         </trkpt>
         <trkpt lat="-33.473621" lon="-70.654243">
            <time>2015-04-02T12:27:33Z</time>
         </trkpt>
         <trkpt lat="-33.473621" lon="-70.654243">
            <time>2015-04-02T12:27:34Z</time>
         </trkpt>
         <trkpt lat="-33.47356" lon="-70.654449">
            <time>2015-04-02T12:27:35Z</time>
         </trkpt>
         <trkpt lat="-33.473049" lon="-70.654732">
            <time>2015-04-02T12:27:36Z</time>
         </trkpt>
         <trkpt lat="-33.471439" lon="-70.65583">
            <time>2015-04-02T12:27:37Z</time>
         </trkpt>
         <trkpt lat="-33.47118" lon="-70.655899">
            <time>2015-04-02T12:27:38Z</time>
         </trkpt>
         <trkpt lat="-33.47002" lon="-70.655983">
            <time>2015-04-02T12:27:39Z</time>
         </trkpt>
         <trkpt lat="-33.47002" lon="-70.655983">
            <time>2015-04-02T12:27:40Z</time>
         </trkpt>
         <trkpt lat="-33.469978" lon="-70.656036">
            <time>2015-04-02T12:27:41Z</time>
         </trkpt>
         <trkpt lat="-33.470009" lon="-70.65657">
            <time>2015-04-02T12:27:42Z</time>
         </trkpt>
         <trkpt lat="-33.470058" lon="-70.656616">
            <time>2015-04-02T12:27:43Z</time>
         </trkpt>
         <trkpt lat="-33.470058" lon="-70.656616">
            <time>2015-04-02T12:27:44Z</time>
         </trkpt>
         <trkpt lat="-33.46999" lon="-70.6567">
            <time>2015-04-02T12:27:45Z</time>
         </trkpt>
         <trkpt lat="-33.46999" lon="-70.657028">
            <time>2015-04-02T12:27:46Z</time>
         </trkpt>
         <trkpt lat="-33.470131" lon="-70.659447">
            <time>2015-04-02T12:27:47Z</time>
         </trkpt>
         <trkpt lat="-33.470211" lon="-70.65963">
            <time>2015-04-02T12:27:48Z</time>
         </trkpt>
         <trkpt lat="-33.470211" lon="-70.65963">
            <time>2015-04-02T12:27:49Z</time>
         </trkpt>
         <trkpt lat="-33.473309" lon="-70.659439">
            <time>2015-04-02T12:27:50Z</time>
         </trkpt>
         <trkpt lat="-33.473309" lon="-70.659439">
            <time>2015-04-02T12:27:51Z</time>
         </trkpt>
         <trkpt lat="-33.473209" lon="-70.659554">
            <time>2015-04-02T12:27:52Z</time>
         </trkpt>
         <trkpt lat="-33.473309" lon="-70.661209">
            <time>2015-04-02T12:27:53Z</time>
         </trkpt>
         <trkpt lat="-33.473412" lon="-70.66127">
            <time>2015-04-02T12:27:54Z</time>
         </trkpt>
         <trkpt lat="-33.473412" lon="-70.66127">
            <time>2015-04-02T12:27:55Z</time>
         </trkpt>
         <trkpt lat="-33.473309" lon="-70.661324">
            <time>2015-04-02T12:27:56Z</time>
         </trkpt>
         <trkpt lat="-33.473419" lon="-70.663223">
            <time>2015-04-02T12:27:57Z</time>
         </trkpt>
         <trkpt lat="-33.47353" lon="-70.663292">
            <time>2015-04-02T12:27:58Z</time>
         </trkpt>
         <trkpt lat="-33.47353" lon="-70.663292">
            <time>2015-04-02T12:27:59Z</time>
         </trkpt>
         <trkpt lat="-33.47068" lon="-70.663422">
            <time>2015-04-02T12:28:00Z</time>
         </trkpt>
         <trkpt lat="-33.47068" lon="-70.663422">
            <time>2015-04-02T12:28:01Z</time>
         </trkpt>
         <trkpt lat="-33.470501" lon="-70.663391">
            <time>2015-04-02T12:28:02Z</time>
         </trkpt>
         <trkpt lat="-33.470451" lon="-70.663429">
            <time>2015-04-02T12:28:03Z</time>
         </trkpt>
         <trkpt lat="-33.470451" lon="-70.663429">
            <time>2015-04-02T12:28:04Z</time>
         </trkpt>
         <trkpt lat="-33.470581" lon="-70.667702">
            <time>2015-04-02T12:28:05Z</time>
         </trkpt>
         <trkpt lat="-33.470551" lon="-70.667892">
            <time>2015-04-02T12:28:06Z</time>
         </trkpt>
         <trkpt lat="-33.4706" lon="-70.671631">
            <time>2015-04-02T12:28:07Z</time>
         </trkpt>
         <trkpt lat="-33.4706" lon="-70.671631">
            <time>2015-04-02T12:28:08Z</time>
         </trkpt>
         <trkpt lat="-33.47192" lon="-70.671623">
            <time>2015-04-02T12:28:09Z</time>
         </trkpt>
         <trkpt lat="-33.47192" lon="-70.671623">
            <time>2015-04-02T12:28:10Z</time>
         </trkpt>
         <trkpt lat="-33.471901" lon="-70.670326">
            <time>2015-04-02T12:28:11Z</time>
         </trkpt>
         <trkpt lat="-33.471901" lon="-70.670326">
            <time>2015-04-02T12:28:12Z</time>
         </trkpt>
         <trkpt lat="-33.470619" lon="-70.670341">
            <time>2015-04-02T12:28:13Z</time>
         </trkpt>
         <trkpt lat="-33.470589" lon="-70.670288">
            <time>2015-04-02T12:28:14Z</time>
         </trkpt>
         <trkpt lat="-33.470589" lon="-70.670288">
            <time>2015-04-02T12:28:15Z</time>
         </trkpt>
         <trkpt lat="-33.4706" lon="-70.671631">
            <time>2015-04-02T12:28:16Z</time>
         </trkpt>
         <trkpt lat="-33.4706" lon="-70.671631">
            <time>2015-04-02T12:28:17Z</time>
         </trkpt>
         <trkpt lat="-33.46941" lon="-70.671661">
            <time>2015-04-02T12:28:18Z</time>
         </trkpt>
         <trkpt lat="-33.46941" lon="-70.671661">
            <time>2015-04-02T12:28:19Z</time>
         </trkpt>
         <trkpt lat="-33.469421" lon="-70.672089">
            <time>2015-04-02T12:28:20Z</time>
         </trkpt>
         <trkpt lat="-33.469421" lon="-70.672089">
            <time>2015-04-02T12:28:21Z</time>
         </trkpt>
         <trkpt lat="-33.470619" lon="-70.672081">
            <time>2015-04-02T12:28:22Z</time>
         </trkpt>
         <trkpt lat="-33.470619" lon="-70.672081">
            <time>2015-04-02T12:28:23Z</time>
         </trkpt>
         <trkpt lat="-33.470669" lon="-70.679131">
            <time>2015-04-02T12:28:24Z</time>
         </trkpt>
         <trkpt lat="-33.470669" lon="-70.67913">
            <time>2015-04-02T12:28:25Z</time>
         </trkpt>
      </trkseg>
   </trk>
</gpx>

Mapping sidewalk

I am working on a project to infer the sidewalk from the GPX traces that are collected while the person is walking. The map-matching algorithm works perfectly to map the GPS points to the road, but is there any way i can infer which side of the road the user is walking. This would enable me to tag where the sidewalk is available on the street (i.e., right/left side of the road). I would appreciate, if you can could throw some pointers on how to achieve this with the graph hopper based map-matcher.

Slicing the GPX leads to orientation errors

With most GPX trails I tested map-matching with, I'm getting orientation errors with most separatedSearchDistance values, except when I set separatedSearchDistance to very high values so that the trail will be sliced only very few times or not at all.

The tests were done with GPX files where there is a GPS point every one second or every two seconds.

As far as I can see, the problem seems to occur when by chance, the start of a new slice of the GPX file is where the current GPS point is closer to a street that leads away from the actual street driven than to that street itself.

If required, I can provide GPX files showing the issue, but I'll do so only directly to you, not via publicly visible means.

Improve results if GPX contains loop

  • forceRepair currently is limited. Instead of checking for edge duplicates we should check for missing GPX matches
  • we need a proper loop detection and then
  • recursively detect loops and insert them
  • Or instead of this loop insert algorithm I can think of a guided routing algorithm with a steadily changing goal. (could time dependent weights solve this?)

Arguments not parsed

When running this the arguments given to main don't get parsed.

When running ./map-matching.sh action=import datasource=file.pbf
the arguments passed to CmdArgs.read are ["action=import datasource=file.pbf"] and not ["action=import", "datasource=file.pbf"]. Consequently when getting the action it gets "import datasource=file.pbf" and it's empty for the datasource.

I've made a small adjustment to run it locally, if it's an issue I can make a PR, but not sure if it's just me.

Anyway, I'm running on OSX El Capitain, and I'm using zsh

java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

Running this in a docker container (maven:3.3.3-jdk-8), with bash and without the changes, also causes this problem.

Thank you

maxSearchMultiplier is too error prone

maxSearchMultiplier is too error prone we need e.g. to solve this via a more generic maxVisitedNodes. Increasing maxSearchMultiplier to high values does fix the problem but hurts performance

Remove duplicate entries from LocationIndexMatch

Currently a list returned from LocationIndexMatch can contain QueryResult with duplicate edges, we should keep only the QueryResult with the closest snap (only make a difference if NODE or EDGE snap)

keep -> 51.0299515,13.7312364,135.0, 1262321564000, query distance:5.303846908850638, gpxListIndex:218
        51.0299515,13.7312364,135.0, 1262321564000, query distance:7.0464515718966, gpxListIndex:218
        51.0299515,13.7312364,135.0, 1262321564000, query distance:12.1125611024485, gpxListIndex:218

Attach turn instructions to the GPX result

Use MatchResult.edgeMatches to fill MatchResult.instructions identical to what we do in Path.calcInstructions.

This needs some changes in the core (moving submethod of Path.calcInstructions into public method of e.g. InstructionList.create?).

Suggestion: More precision

During the matching algorithm, the software can do an extra check to remove spurious errors. The program may check the edge of the point, and check one (two-customizable) points backwards and one (two-customizable) points forwards to see if their edge is in a street that's on the same class. If the point before (x-1) and after (x+1) are on a highway, and x is not on a motorway, you can do an extra check if the point is near a motorway, and ignore it if it so. Could this be a right idea?

Missing or old OSM data

I tried to match this GPX track to the Berlin Metro Extracts:
https://www.openstreetmap.org/user/6arms1leg/traces/1744934

I got the error:

 ERROR com.graphhopper.matching.MapMatchingMain - Problem with file 1744934.gpx Error: Cannot find matching path! Missing or old OpenStreetMap data? 3, [9440-9459  52.504784799189046,13.431137763501447,NaN], [9459-9460  52.503416108960835,13.430194862753655,NaN]

Both points are directly on a OSM street. What could be the reason for the error?

Timedate parse issue

I tried the following file as a test: https://www.openstreetmap.org/user/epe/traces/776904

The error I got is the following:

2015-02-12 14:59:45,897 [main] ERROR com.graphhopper.matching.MapMatchingMain - Problem with file 776904.gpx Error: java.text.ParseException: Unparseable date: "2010-07-30T17:5236"

What is the expected datetime format? Can we add this to the docs?

refactor to use hmm-lib 1.0.0

I just published a pre-release (snapshot) of hmm-lib 1.0.0.

Using this new version in Graphhopper map-matching would bring several improvements:

  • The API was redesigned to allow calling the Viterbi algorithm iteratively. This allows using single-source multi-target routing, which should result in a speed-up. Moreover, if an HMM break occurs, the GPS trace can be split at the break and both sub traces can be matched separately.
  • The paths between matched positions (the entire matched route) can now be retrieved after computing the most likely sequence using transition descriptors. Hence, there is no need anymore to store all paths between subsequent candidates.
  • Memory footprint is reduced from O(t*n²) to O(t) for typical GPS traces, where t is the number of time steps and n is the number of candidates per time step.

The project offline-map-matching, branch-1.0.0 is now also using the hmm-lib 1.0.0-SNAPSHOT. In there, OfflineMapMatcherTest.java provides an example how to use the new hmm-lib API, which can be used as a template for Graphhopper map-matching.

Feedback is welcome!

Error: Unable to access jarfile action=import

When I am trying to import a file I get the following error:

ls: target/map-matching-*-dependencies.jar: No such file or directory
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building GraphHopper Map Matching 0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ map-matching ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ map-matching ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ map-matching ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /Users/ustroetz/projects/map-matching/target/classes
[WARNING] /Users/ustroetz/projects/map-matching/src/main/java/com/graphhopper/matching/MapMatching.java: /Users/ustroetz/projects/map-matching/src/main/java/com/graphhopper/matching/MapMatching.java uses unchecked or unsafe operations.
[WARNING] /Users/ustroetz/projects/map-matching/src/main/java/com/graphhopper/matching/MapMatching.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ map-matching ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ map-matching ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to /Users/ustroetz/projects/map-matching/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ map-matching ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-jar-plugin:2.5:jar (default-jar) @ map-matching ---
[INFO] Building jar: /Users/ustroetz/projects/map-matching/target/map-matching-0.5-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ map-matching ---
[INFO] Installing /Users/ustroetz/projects/map-matching/target/map-matching-0.5-SNAPSHOT.jar to /Users/ustroetz/.m2/repository/com/graphhopper/map-matching/0.5-SNAPSHOT/map-matching-0.5-SNAPSHOT.jar
[INFO] Installing /Users/ustroetz/projects/map-matching/pom.xml to /Users/ustroetz/.m2/repository/com/graphhopper/map-matching/0.5-SNAPSHOT/map-matching-0.5-SNAPSHOT.pom
[INFO] 
[INFO] --- maven-assembly-plugin:2.5.3:single (default-cli) @ map-matching ---
[INFO] Building jar: /Users/ustroetz/projects/map-matching/target/map-matching-0.5-SNAPSHOT-jar-with-dependencies.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.583 s
[INFO] Finished at: 2015-03-11T11:02:43+01:00
[INFO] Final Memory: 28M/207M
[INFO] ------------------------------------------------------------------------
Error: Unable to access jarfile action=import

The steps I did are the following:

git clone https://github.com/graphhopper/map-matching.git
cd map-matching/
wget https://s3.amazonaws.com/metro-extracts.mapzen.com/santiago_chile.osm.pbf
./map-matching.sh action=import datasource=santiago_chile.osm.pbf [vehicle=car]

The target folder lists the following:

$ ll target/
total 10104
drwxr-xr-x  2 ustroetz  staff       68 Mar 11 11:02 archive-tmp
drwxr-xr-x  4 ustroetz  staff      136 Mar 11 11:02 classes
drwxr-xr-x  3 ustroetz  staff      102 Mar 11 11:02 generated-sources
drwxr-xr-x  3 ustroetz  staff      102 Mar 11 11:02 generated-test-sources
-rw-r--r--  1 ustroetz  staff  5133695 Mar 11 11:02 map-matching-0.5-SNAPSHOT-jar-with-dependencies.jar
-rw-r--r--  1 ustroetz  staff    34353 Mar 11 11:02 map-matching-0.5-SNAPSHOT.jar
drwxr-xr-x  3 ustroetz  staff      102 Mar 11 11:02 maven-archiver
drwxr-xr-x  3 ustroetz  staff      102 Mar 11 11:02 maven-status
drwxr-xr-x  9 ustroetz  staff      306 Mar 11 11:02 test-classes

Example Code in Readme

The sample code in the Readme is not working:

Graph graph = hopper.getGraph();
LocationIndexMatch locationIndex = new LocationIndexMatch(graph, new RAMDirectory());
locationIndex.prepareIndex();
MapMatching mapMatching = new MapMatching(graph, locationIndex, encoder);

I get the following error:

The constructor LocationIndexMatch(Graph, RAMDirectory) is undefined    Routing.java    line 145    Java Problem

That is because LocationIndexMatch expects a GraphStorage and not a Graph.
But if I change the code to, like it is done in the test files:

GraphStorage graph = hopper.getGraph();
LocationIndexMatch locationIndex = new LocationIndexMatch(graph, (LocationIndexTree) hopper.getLocationIndex());         
MapMatching mapMatching = new MapMatching(graph, locationIndex, encoder);

I get the following exception:

05-07 11:26:24.235: E/AndroidRuntime(18902): Caused by: java.lang.IllegalArgumentException: Call LevelGraph.getBaseGraph() instead of using the LevelGraph itself

support CH for matching

Currently it is based on none-CH routing giving us several advantages. We should try CH and see if it is faster.

Association of all provided GPXEntry to the corresponding EdgeMatch

Discussion: https://discuss.graphhopper.com/t/map-matchresult-to-gpxentry/977

The plan was that all GPXEntries which we used for matching should be associated to EdgeMatch

This doesn't work since the rework of the matching algorithm in doWork(List<GPXEntry> gpxList)
from the pull-request #49

The main reason for this is the filtering of GPXEntries by a distance threshold
distance(previousGPX, currentGPX) > 2 * measurementErrorSigma
which are never considered again in the the following resolvation of MostLikelySequence to EdgeMatch

GPXEntries are disregarded to avoid too many (superfluous) calculations.

map edgeId to OSM wayID

Hey,

I'm new to graphhopper and i'm using this map matching master to match some GPX data.
I want to get the OSM wayID or nodeID of the matched result but it seems that the results is list of matched edges. I don't really understand what are those edgeID, what do they represent in Open street map?

Thanks for help.

Wrong match

What is the reason for this match? Is there a way for me as a user to improve the input?
Is it possible that the map matching algorithm respects bearing?

green line = matched track
points = input track
grey lines = OSM highways

screen shot 2015-02-18 at 13 12 15
screen shot 2015-02-18 at 13 12 05

Cannot import data - error

Hi,

When I ran this command:
./map-matching.sh action=import datasource=/home/map-matching/map-data/leipzig_germany.osm.pbf

I got this error:
ipzig_germany.osm.pbf
ls: cannot access target/map-matching-*-dependencies.jar: No such file or directory
[INFO] Scanning for projects...
Downloading: https://oss.sonatype.org/content/groups/public/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
Downloading: http://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.graphhopper:map-matching:0.5-SNAPSHOT (/home/isg/Desktop/map-matching/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact org.sonatype.oss:oss-parent:pom:9 from/to sonatype-oss-public (https://oss.sonatype.org/content/groups/public/): oss.sonatype.org: No address associated with hostname and 'parent.relativePath' points at no local POM @ line 17, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Error: Unable to access jarfile action=import

Maven and Java are installed.
The output of echo $JAVA_HOME is the following: /usr/lib/jvm/java-7-openjdk-amd64/jre

Can you help me ?

Thanks,

PostGIS map matching adaptor/plugin

I feel really stupid to ask this, but I can't make head or tail of the readme. Is the only valid input format a GPX file? Actually I have my points stored within PostGIS and I'm searching for an easy way to map it to OSM. Any ideas?

Possible problem with a less frequent GPX signal

In the case if the GPX signal is not that frequent and the edge of one point P is rather short, this will reduce the impact of the weighting of the taken route through P and therefor could go another route without P.

One solution could be to insert artificial GPX points before and after P to reduce other edges close to P as well and increase probability that the routing engine uses a route through P.

Cannot find matching path error

I’m trying to use your map matching software, but I am running into the following error when I try to execute it in terminal:
2015-06-30 13:09:45,455 [main] ERROR com.graphhopper.matching.MapMatchingMain - Problem with file /Users/jycai/Desktop/newGpx2.gpx Error: Cannot find matching path! Wrong vehicle car or missing OpenStreetMap data? Try to increase maxSearchMultiplier (100.0). Current gpx sublist:52, start list:[5184-46176 32.245996756389665,34.91484582233829,NaN], end list:[5422-6047 32.24460089008363,34.91189092200751,NaN], bounds: 34.700081714244526,35.051999838322395,31.92900062193723,32.24599936409293

The command I’m using is: ./map-matching.sh action=match gpx=~/Desktop/newGpx2.gpx as specified by the readme.

The route is a route in Tel Aviv, Israel and I downloaded the .osm.pbf map for that and processed it, so I am not sure why I am running into this error or how to proceed. Could you lend any suggestions?

Improve matching for oneways

I'm trying to map match the following route - it is a series of lat-lon-time triplets taken at 1 Hz.
screen shot 2015-07-01 at 11 41 11 am

After I put them through graphhopper's mapmatching software, I get the following output:
screen shot 2015-07-01 at 11 41 12 am
As you can see, there are a bunch of points on the right that are returned by graphhopper that are not in the route that was inputted. What I believe happened was a trip was detected to occur on the opposite end of the street, so graphhopper returned the closest shortest way to get from one side of the street to the other, hence the extra points. Is there anything I can do to reformat the data I input so this does not occur, otherwise what can I do to detect when this occurs (other than looking at its output)?

I'm also running into a problem with another route. The route I'm using looks like this:
screen shot 2015-07-01 at 11 41 07 am

The points that I am getting back look like this:
screen shot 2015-07-01 at 11 41 09 am
I double checked the order in which points were inputted in my route - the first point is on the bottom left and continue on to the top right as they are inputted. The result that graphhopper is returning starts at the end of my trip (top right), and ends on the bottom left. I'm not sure why this is happening and I've tried reversing the input of my data and am getting the same result. Does anyone know why this is happening?

Bus tracking

The matcher seems to assume that cars will obey traffic rules, for example by not taking shortcuts through roads that only allow buses. Example with bus only exit marked with red "B":

bus_route

But what if the vehicle that we're trying to track is a bus? Any chance of implementing a vehicle option for buses?

Suggestion: Looping resolution

Hi! I've read about the loop problem, and your idea about MappointX, MappointX+4, etc... I was thinking it would be better to divide the subtrack based on same points. For example
idea1 instead of routing from A to B, you can route in pair A-B,C-D,etc...

If points are near (5m-10m-adjustable) and subsequent, treat them as one. In are near but not subsequent, like the drawing above, dividing the route should be OK. It's a good idea? :)

can the input gps traces file contain just point ?

Hi,
I want to match some points to the road network with the ESRI's shp file(point layer and road network layer). I try to convert the shp file to gpx format and run it in your software, error 'gpx list needs at least 2 points' appears. So, can the input gps traces file contain just point ? what should I do ?

Can't handle subsecond precision in GPX files

Some GPX traces have more than one point per second, and have sub-second accuracy. (AFAIR) this is allowed in ISO datetimes, but the DATE_FORMAT/DATE_FORMAT_Z doesn't match subseconds, and you get this error when trying to match such a GPX file:

Exception in thread "main" java.lang.IllegalStateException: java.text.ParseException: Unparseable date: "2012-11-08T14:19:37.500Z"

gpx attributes lost after map matching

After running the map matching algorithm on an input gpx file, the output gpx file is missing all other attributes such as <desc></desc> or <link></link>

All vehicles in input data

I need to process data from 24h when somebody can use all vehicle.
After hopper.importOrLoad(); I can't change settings. How can I prepare map-matching for a large number of different routes?

How to match a ferry route

Some of my test tracks include ferry rides. Here the algorithm often fails as ferries don't always take exactly the same route. The algorithm could maybe adjust the gpxAccuracy in this case to a much more relaxed value, eventually by somehow takeing the length of the ferry route edge into account.
Besides that the algorithm works pretty well.

src/main/resources/log4j.xml overriding client log configuration

The src/main/resources/log4j.xml is interfering with my own logging configuration.
Suggest that you move your log4j.xml to src/test/resources.

Log4j attempts to load log4j.xml first, and then log4j.properties, using the first it finds on the classpath.

I have my own logging configuration (log4j.properties). Your log4j.xml is being picked up instead.

I can workaround it, but this is something you might like to clean up.

Some related discussion:
http://stackoverflow.com/questions/10890505/multiple-log4j-properties-files-in-classpath?rq=1

extended_json & GeoJson

Hi ,
when i use extanded_json as output with webServer, MapMatching create invalid GeoJson Object with only one point in LineString.

could you confirm this is an issue ?

{ "geometry": "{\"coordinates\":[[3.89894,43.609859]],\"type\":\"LineString\"}", "id": 78938, "wpts": [] }, { "geometry": "{\"coordinates\":[[3.898914,43.609945]],\"type\":\"LineString\"}", "id": 471587, "wpts": [] }, { "geometry": "{\"coordinates\":[[3.898889,43.61003],[3.898851,43.610155],[3.898824,43.610272]],\"type\":\"LineString\"}", "id": 471588, "wpts": [] }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.