Hi there,
We are needing a similar solution to detect directionalityof an edge relative to how the geometries were defined in the original OSM map. We also need to store the edge position relative to the original way definition, represented as an index.
For example, if a way consists of 3 edges A->B, B->C, C->D, then the edges would have index 0, 1, 2 on that way.
For deal with directionality, we tried the suggestion of using DataFlagEncoder along with CarFlagEncoder:
_hopper.setEncodingManager(new EncodingManager(carFlagEncoder, dataFlagEncoder))
But we are getting this error:
Encoders are requesting 37 bits, more than 32 bits of way flags. Decrease the number of vehicles or increase the flags to take long via graph.bytes_for_flags: 8
java.lang.IllegalArgumentException: Encoders are requesting 37 bits, more than 32 bits of way flags. Decrease the number of vehicles or increase the flags to take long via graph.bytes_for_flags: 8
at com.graphhopper.routing.util.EncodingManager.registerEncoder(EncodingManager.java:198)
What does this mean and what can be done?
Thanks,
Trang