Like many others it would seem, I too would like to return associated OSM data for the path returned in the map matching functionality. In my case, for each edge I’d like the WayID and the tags, with the end goal of identifying the Ways and the highway type for each edge. I’ve seen some comments about how Node IDs are better, wouldn’t mind an explanation as to why that is.
Reading some the posts/links, mainly:
It seems/seemed possible, however I think a lot of these posts are a bit out of date and don’t work for graphhopper 3.0. As per the posts:
I’ve created the
OSMReaderOSM class in the
com.graphhopper.reader.osm package of the
core module. Seems ok.
Next I created an
OSMGraphHopper class in the
com.graphhopper package of the
core module, however there are a few compilation issues. The
calcPaths() methods seem to be gone (get complaints about non existent overridden methods), also there is no
DataReader class anymore.
Any idea on how to tweak the previous changes to work in 3.0? Also, how do I get my custom OSMGraphHopper instance to be injected instead of the default one, do I just change lines 55 and 60 in
MapMatchingResource to use my custom one instead?