Hi Martin,
that is currently not stored (except the street name which should be
there) but such an extension would be very valuable.
Kind Regards,
Peter
On 25.08.2015 17:49, Martin Malfertheiner wrote:
> Hi,
>
> I’m working on an extension of the routing engine. My goal is to map a
> gpx track to a osm track and then extract all osm data of the
> resulting track. Right now I get only the distance, speed and points
> of an edge, but I would like also to know the osm tags such as
> surface, highway,… of each edge. Is there already something in place
> which can deliver this information or do I have to program it on my
> own? Can you maybe give me some hints.
>
> example:
>
> GPXFile gpxFile = new
> GPXFile().doImport("./track-data/Garmin_150704_Seis_Konstantin.gpx");
> List<GPXEntry> inputGPXEntries = gpxFile.getEntries();
> MatchResult mr = mapMatching.doWork(inputGPXEntries);
>
> // return GraphHopper edges with all associated GPX entries
> List<EdgeMatch> matches = mr.getEdgeMatches();
> // now do something with the edges like storing the edgeIds or doing
> fetchWayGeometry etc
> for(EdgeMatch match : matches) {
> long flags = match.getEdgeState().getFlags();
> PointList geometry = match.getEdgeState().fetchWayGeometry(3);
> //System.out.println(geometry);
> System.out.print("Distance: " + match.getEdgeState().getDistance() + ",
> Points per edge: " + geometry.size() + ", Speed: " + encoder.getSpeed(flags)
> + ", Turn cost: " + encoder.getTurnCost(flags) + ", Is forward: " +
> encoder.isForward(flags) + "\n");
> }
> Thats all the infos I found so far about an edge. Is OSM data also
> stored somewhere?
>
> All the best,
>
> Martin
>
>
> _______________________________________________
> GraphHopper mailing list
> [email protected]
> https://lists.openstreetmap.org/listinfo/graphhopper
_______________________________________________
GraphHopper mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/graphhopper