Accurate elevation support

Dear Graphhopper Community,

We are currently evaluating routing engines for a customer who has detailed 3D vector paths, transformed to the OSM format with a “ele” tag (for elevation on each node).

Graphhopper looks like a really great, high performance routing tool, so we are considering it in our analysis.

As far as I understood, elevation is currently supported as raster input.
Or is it possible to use the ele tag on each node, in order to get a 3D geometry of a route?
A typical use case would be to correctly route over a bridge as well as on a path passing under the bridge, with both correct height profiles.

Would you be interested in such a feature if we would contribute this in the graphhopper code?

Thanks in advance!

Or is it possible to use the ele tag on each node, in order to get a 3D geometry of a route?

You can overwrite this method: https://github.com/graphhopper/graphhopper/blob/master/reader-osm/src/main/java/com/graphhopper/reader/osm/OSMReader.java#L561

But usually it would be better to create a custom ElevationProvider instead of feeding this to the OSM data first.

A typical use case would be to correctly route over a bridge as well as on a path passing under the bridge, with both correct height profiles.

This is something that is already working with the DataFlagEncoder, see https://github.com/graphhopper/graphhopper/pull/798

But as this was rather limited, there will be a an improved approach in the next version, where it will be fixed for all vehicle profiles. Have a look at this PR that is finished in this regard (but needs attention to other details) Introduce RoadClass, RoadEnvironment, CarMaxSpeed, Surface, Toll and more EncodedValues by karussell · Pull Request #1548 · graphhopper/graphhopper · GitHub

Great, thanks a lot karussell! We’ll have a look at these two different options you pointed out :slight_smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.