<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Martin,<br>
      <br>
      that is currently not stored (except the street name which should
      be there) but such an extension would be very valuable.<br>
      <br>
      Kind Regards,<br>
      Peter<br>
      <br>
      On 25.08.2015 17:49, Martin Malfertheiner wrote:<br>
    </div>
    <blockquote
      cite="mid:FB320D52-1934-470A-9102-FD5634C0DAA1@gmail.com"
      type="cite">Hi,
      <div class=""><br class="">
      </div>
      <div class="">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.</div>
      <div class=""><br class="">
      </div>
      <div class="">example:</div>
      <div class=""><br class="">
      </div>
      <div class="">
        <pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'Menlo';font-size:12,0pt;" class="">GPXFile gpxFile = <span style="color:#cc7832;" class="">new </span>GPXFile().doImport(<span style="color:#6a8759;" class="">"./track-data/Garmin_150704_Seis_Konstantin.gpx"</span>)<span style="color:#cc7832;" class="">;
</span>List<GPXEntry> inputGPXEntries = gpxFile.getEntries()<span style="color:#cc7832;" class="">;
</span>MatchResult mr = mapMatching.doWork(inputGPXEntries)<span style="color:#cc7832;" class="">;
</span><span style="color:#cc7832;" class="">
</span><span style="color:#808080;" class="">// return GraphHopper edges with all associated GPX entries
</span>List<EdgeMatch> matches = mr.getEdgeMatches()<span style="color:#cc7832;" class="">;
</span><span style="color:#808080;" class="">// now do something with the edges like storing the edgeIds or doing fetchWayGeometry etc
</span><span style="color:#cc7832;" class="">for</span>(EdgeMatch match : matches) {
    <span style="color:#cc7832;" class="">long </span>flags = match.getEdgeState().getFlags()<span style="color:#cc7832;" class="">;
</span><span style="color:#cc7832;" class="">    </span>PointList <span style="background-color:#40332b;" class="">geometry</span> = match.getEdgeState().fetchWayGeometry(<span style="color:#6897bb;" class="">3</span>)<span style="color:#cc7832;" class="">;
</span><span style="color:#cc7832;" class="">    </span><span style="color:#808080;" class="">//System.out.println(geometry);
</span><span style="color:#808080;" class="">    </span>System.<span style="color:#9876aa;font-style:italic;" class="">out</span>.print(<span style="color:#6a8759;" class="">"Distance: " </span>+ match.getEdgeState().getDistance() + <span style="color:#6a8759;" class="">", Points per edge: " </span>+ <span style="background-color:#344134;" class="">geometry</span>.size() + <span style="color:#6a8759;" class="">", Speed: " </span>+ encoder.getSpeed(flags) + <span style="color:#6a8759;" class="">", Turn cost: " </span>+ encoder.getTurnCost(flags) + <span style="color:#6a8759;" class="">", Is forward: " </span>+ encoder.isForward(flags) + <span style="color:#6a8759;" class="">"</span><span style="color:#cc7832;" class="">\n</span><span style="color:#6a8759;" class="">"</span>)<span style="color:#cc7832;" class="">;
</span>}</pre>
        <div class="">Thats all the infos I found so far about an edge.
          Is OSM data also stored somewhere?</div>
      </div>
      <div class=""><br class="">
      </div>
      <div class="">All the best,</div>
      <div class=""><br class="">
      </div>
      <div class="">Martin</div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
GraphHopper mailing list
<a class="moz-txt-link-abbreviated" href="mailto:GraphHopper@openstreetmap.org">GraphHopper@openstreetmap.org</a>
<a class="moz-txt-link-freetext" href="https://lists.openstreetmap.org/listinfo/graphhopper">https://lists.openstreetmap.org/listinfo/graphhopper</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>