Is it possible to get the Tag of an Edge of a Path?

Hi community,
I am trying to enhance the Instructions so that they include additional information (type of highway, if there are tunnes, etc).
However I am not being able to do so since it appears that some of the OSM information was let behind while building the graph.
Please correct me if I am wrong, but for what I see after some code investigation the OSMReader uses the different Encoders (car encoder, etc) to “compress” the OSM Tags into Flags. The flags for instance define a speed for a given type of road, which is indeed saved as part of the graph (See CarFlagEncoder.java handleWayTags method and OSMReader line 395) . I understand that this is in order to reduce the memory footprint at runtime. However it would be nice to be able to retrieve this information for a given edge in order to be able to provide additional information such as the one I described in the beginning of this message.
Perhaps I am missing something and this is already possible. Could you please clarify if the results of my investigation thus far are correct, and if so, could you give me some pointers on what approach would be more convenient and respectful to the existing code architecture in order to do so?

Thanks a lot in advance.

As far as I know it isn’t possible to store the original OSM tags, especially string values, in the graph. But this would be a really nice feature, as well as an access to the OSM tags of the nodes along an edge/way for landmarks in the annotations.

Actually it can be possible, though via an “enriched” graph.
See the related discussion here for more details.

Emux

@devemux86 is right, this is possible but currently under development to make it easier: https://github.com/graphhopper/graphhopper/pull/730 see the test cases that are then possible

EdgeIteratorState edge = ...
assertEquals("primary", encoder.getHighwayAsString(edge));
assertEquals("sand", encoder.getSurfaceAsString(edge));
assertTrue(encoder.isTransportMode(edge, encoder.getTransportMode("tunnel")));

Of course the API is not yet finalized …