Hi Achim,

currently only unpaved or paved (unpavedBit) and road, pushing section,
cycleway or other small way is stored (wayTypeEncoder) is stored for
later access (see BikeCommonFlagEncoder) but you should be able to
extend the bike encoders to your needs and store any kind of information
e.g. introduce a new 'EncodedValue surfaceEncoder'

To get that data you can override the GraphHopper.getPaths method where
you get raw access to the edges via Paths.calcEdges. Then with the
encoder do

encoder.isBool(edge.getFlags(), BikeCommonFlagEncoder.UNPAVED) 

or

encoder.getLong(edge.getFlags(), YourClass.SURFACE_CODE) // returns a long 
which you can convert to the strings


or like it is done for wayTypeEncoder:

encoder.getAnnotation(edge.getFlags(), tanslation )


Regards,
Peter.

On 10.11.2014 20:57, Achim Augenstein wrote:
> Hi
>
> i use the cycle routing of Graphhopper. How can i get the  length AND
> the surface of a routing section from the standalone API (getter
> function?)?
>
> Thanks
> Achim
>
>
> _______________________________________________
> GraphHopper mailing list
> [email protected]
> https://lists.openstreetmap.org/listinfo/graphhopper

_______________________________________________
GraphHopper mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/graphhopper

Reply via email to