[GraphHopper] Routinggewichte | elevation data

Peter K peathal at yahoo.de
Mon May 6 08:34:20 UTC 2013


Hi Robert,

I'll anwser in English to make the others here follow as well :) !

Nice to hear that all works as expected for you.

Do you use elevation data that is freely available somewhere?
Like http://wiki.openstreetmap.org/wiki/SRTM or http://ned.usgs.gov/?
Then I would have interests in a pull request to support such data (e.g.
for FOOT/BIKE vehicles) directly in graphhopper :) !
Do you need the fast routing as well (contraction hierarchies)?

To influence the speed from elevation data some changes will be necessary:
 * make sure you create *directed* edges if the nodes have an altitude
difference. (so, for forward and backward direction!)
 * altitute values should be stored in a new DataAccess object (see e.g.
geometry in GraphStorage). Probably one int per node?
 * then OSMReaderHelper and/or OSMReaderHelperDoubleParse have to be
modified to read that data
 * The VehicleEncoder (which should be probably renamed to
PropertyEncoder?) should be able to calculate the correct speed from
that data. Alternatively you could store the already calculated data
directly as edge.distance but this would mean that only fastest paths
can be calculated (no longer 'shortest'). And it would be necessary to
still use the 'ShortestCalc' weight calculation as it does not modify
the edge.distance on the fly.

But wait ... just start with a small unit test which reads the elevation
data and stores the weights directly:
https://github.com/graphhopper/graphhopper/wiki/Low-Level-API

Regards,
Peter.

> Hallo Peter,
>
> vielen Dank erstmal fuer die schnelle Antwort. Das Generieren der
> Karte hat einwandfrei funktioniert.
> Zum Thema Routinggewichte:
> Ich wuerde gerne Hoehendaten und evtl Energiewerte mit in den
> Routinggraphen einpflegen.
> Mit diesen neuen Daten und den daraus resultierenden neuen
> Kantengewichten soll ein EcoRouting realisiert werden. So soll
> beispielsweise ihr DijkstraBi Algorithmus zur Berechung verwendet
> werden, jedoch dann mit den anderen Kantengewichten.
>
>
> Viele Dank im voraus &
> Viele Gruesse
>
> Robert

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20130506/34a7ceb2/attachment-0001.html>


More information about the GraphHopper mailing list