graphhopper / map-matching

The map matching functionality is now located in the main repository https://github.com/graphhopper/graphhopper#map-matching
https://www.graphhopper.com/open-source/
Apache License 2.0
785 stars 273 forks source link

What is the GPXExtension? #130

Closed ChenZhongPu closed 6 years ago

ChenZhongPu commented 6 years ago

I tried to conduct 3 points, in which format is <gps_record, time>, map matching.

Then I output the EdgeMatch:

    MatchResult mr = mapMatching.doWork(gpxEntries);
    List<EdgeMatch> edgeMatches = mr.getEdgeMatches();
    for (EdgeMatch edge : edgeMatches) {
        System.out.println(edge.toString());
    }

edge:20621 69379-59343, extensions:[GPXExtension{closest node=118358 at 41.14145054045248,-8.618612220511512, incomingEdge=118358->69379, outgoingEdge=118358->59343}] edge:20620 59343-69381, extensions:[] edge:20619 69381-65686, extensions:[GPXExtension{closest node=118361 at 41.14253426667077,-8.620296614690249, incomingEdge=118361->69381, outgoingEdge=118361->65686}]

  1. The second extension is empty. Is this because the two consecutive points are so close that they are mapped to one position?

  2. In closest node=118358, is it the node id? But the graphhopper info tells that

edges:157 917(5MB), nodes:118 356(2MB)

(The osm data is from http://download.bbbike.org/osm/bbbike/Porto/)

Is the 118 356 the max node ID? If so, there is a obvious confict.

karussell commented 6 years ago

For questions please use our forum.

Is the 118 356 the max node ID? If so, there is a obvious confict.

It is likely a virtual node. Read more about it here: https://github.com/graphhopper/graphhopper/blob/master/docs/core/low-level-api.md