I try to use the Graphhopper Map-Matching. My GPX source file looks something like:

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
  <bounds minlat="49.021236667" minlon="8.430790000" maxlat="49.023695000" maxlon="8.433425000"/>
      <trkpt lat="49.021240000" lon="8.431605000">
      <trkpt lat="49.021240000" lon="8.431605000">
      <trkpt lat="49.021240000" lon="8.431605000">

      <!-- much much more points -->

      <trkpt lat="49.021415000" lon="8.431866667">

Then I run:

./map-matching.sh action=import datasource=mypath/karlsruhe.osm.pbf       vehicle=car

./map-matching.sh action=match gpx=mypath/myfile.gpx

But the resulting gpx file lost all it's times.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creator="Graphhopper" version="1.1" xmlns:gh="https://graphhopper.com/public/schema/gpx/1.1">
<metadata><copyright author="OpenStreetMap contributors"/><link href="http://graphhopper.com"><text>GraphHopper GPX</text></link><time>1970-01-01T01:00:00+01:00</time></metadata>
<trk><name>GraphHopper MapMatching</name><trkseg>
<trkpt lat="49.020944" lon="8.430902"><time>1970-01-01T01:00:00+01:00</time></trkpt>
<trkpt lat="49.021033" lon="8.431043"><time>1970-01-01T01:00:00+01:00</time></trkpt>

<!-- some more points -->

<trkpt lat="49.020944" lon="8.430902"><time>1970-01-01T01:00:00+01:00</time></trkpt></trkseg></trk></gpx>

I tried some different time formats but nothing worked. What am I doing wrong?


The timestamp has to be calculated to be included for the new snapped path. This is a feature not yet done. See this discussion for more information.

| improve this answer | |
  • Okay, maybe a small note in the Readme.md might be helpfull that this feature is not yet ready. – nik Oct 23 '15 at 7:57
  • Feel free to open a PR or issue – Karussell Oct 26 '15 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.