GraphHopper.com | Forum | GitHub | Maps | Blog

Graphhopper Map-Matching looses time attribute


#1
I try to use the Graphhopper Map-Matching. My GPX source file looks something like: 
                <?xml version="1.0" encoding="UTF-8"?><gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/0" 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="12.983948" lon="80.259375"><time>2016-01-01T17:39:39Z</time></trkpt>
                <trkpt lat="12.984126" lon="80.258935"><time>2016-01-01T17:39:45Z</time></trkpt>
                <trkpt lat="12.983974" lon="80.258436"><time>2016-01-01T17:39:58Z</time></trkpt>
                <trkpt lat="12.984141" lon="80.257964"><time>2016-01-01T17:40:07Z</time></trkpt>
                <trkpt lat="12.984272" lon="80.257653"><time>2016-01-01T17:40:22Z</time></trkpt>
                </trkseg></trk></gpx>

    Then i run:

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

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

    But the resulting gpx file lost all it's times.Either its taking current datetime or 1970-01-01T00:00:00Z.

        <?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 0.10" 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>2017-11-07T05:55:25Z</time></metadata>
        <wpt lat="12.983932" lon="80.259472"> <name>22nd St</name></wpt>
        <wpt lat="12.984531" lon="80.25774"> <name>Ziel erreicht</name></wpt>
    <rte>
    <rtept lat="12.983932" lon="80.259472"><desc>dem Stra├čenverlauf von 22nd St folgen</desc><extensions><gh:distance>194.6</gh:distance><gh:time>10779</gh:time><gh:direction>W</gh:direction><gh:azimuth>277.95</gh:azimuth><gh:sign>0</gh:sign></extensions></rtept>
    <rtept lat="12.984174" lon="80.257693"><desc>rechts abbiegen auf South Ave</desc><extensions><gh:distance>40.1</gh:distance><gh:time>2219</gh:time><gh:direction>N</gh:direction><gh:azimuth>7.41</gh:azimuth><gh:sign>2</gh:sign></extensions></rtept>
    <rtept lat="12.984531" lon="80.25774"><extensions><gh:distance>0.0</gh:distance><gh:time>0</gh:time><gh:sign>4</gh:sign></extensions></rtept>
    </rte>
    <trk><name>GraphHopper</name><trkseg>
    <trkpt lat="12.983932" lon="80.259472"><time>2017-11-07T05:55:25Z</time></trkpt>
    <trkpt lat="12.984174" lon="80.257693"><time>2017-11-07T05:55:36Z</time></trkpt>
    <trkpt lat="12.984531" lon="80.25774"><time>2017-11-07T05:55:38Z</time></trkpt>
    </trkseg>
    </trk>
    </gpx>
My question is why its taking 1970-01-01T01:00:00Z or current datetime as start and it continues.why it doesn't take my input time and process it? Thanks in Advance.

#2

This is not yet implemented

See https://github.com/graphhopper/map-matching/issues/23