[OSRM-talk] Lua profile using SRTM elevation

Guillaume Beraudo guillaume.beraudo at camptocamp.com
Thu Jan 22 16:30:55 UTC 2015


I am implementing an OSRM lua profile which takes elevation into account
for computing speeds. This time, using OSM and SRTM 90 data!

I have checked the github issues and mailinglist but not found any new
strategies since our talks last Summer. (
https://github.com/Project-OSRM/osrm-backend/issues/1090 )

Anyway, the idea is straightforward:
- import OSM and SRTM data in a postgis database;
- query elevations using way path node ids from lua;
- do some Maths.

I am using version 4.4.0 due to compiler compatibility.

>From lua, 'way.path' always evaluates to 'nil'.
Is it possible to access the node ids of the way.path from lua?
Is there some luabind magick I could add to ScriptingEnvironment.cpp?
Is there a better method?

I understand that a solution or workaround would not work for 4.5.0
since the path member has been removed from ExtractionWay.


Guillaume Beraudo
Camptocamp Engineer

More information about the OSRM-talk mailing list