graphhopper/graphhopper — pull request #83 by NopMap (2013-07-05 20:02:07+00:00)
Title: Added Elevation data to OSMReader

3D mode is activated by setting a path to/for the DEM data with OSMReader.setDemLocation()
In 3D mode each node is assigned its elevation value before the ways are processed.

With normal encoders, the elevation difference is included in the edge distance calculation.
Elevation sensitive encoders can use the ElevationAnalyzer class to set parameters according to elevation difference or incline.
The class BikeTwoSpeedFlagEncoder is a bike encoder with two speeds for forward/backward which are modified depending on incline/decline. It can be activated in the configuration file like this
osmreader.acceptWay=BIKE,BIKE3D:com.graphhopper.routing.util.BikeTwoSpeedFlagEncoder

DEM handling needs a lot of memory (72MB for each 5°x5° area tile). It's prepared to scale to larger areas but that's not implemented yet.

If 3D mode is not activated, no additional memory is used.