Setup Route altitude profiles SRTM

From OpenStreetMap Wiki
Jump to: navigation, search

This page will guide you when setting up a Route altitude profiles server. Please note that you still have to tweak a lot since there is not install manual.


This list is far from complete. You need the python bindings for these packages (if available).

Setting up apache won't be covered here!


Get the sources:

svn co
svn co

Setup the database

First create the database

createdb srtm
createlang plpgsql srtm

Now make it spatial (note that the files can be in a different location on your system):

psql -d srtm -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql
psql -d srtm -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql

It could be necessary to create a user


You need to create a file (for the import and for the running the service) that is called which contains:


Fill in all the fields that you need

Copy this file srtm2postgis/trunk and to route-altitude-profile/trunk/server


This package downloads the srtm files and lets you import them into your postgis database.





  • <CONTINENT> is one of: Africa, Australia, Eurasia, Islands, North_America or South_America
  • <RESUME> is the file to resume enter 0 if you do not want to resume
  • <NORTH> <SOUTH> <WEST> <EAST> is the bounding box (leave out if you want to download the whole continent). Bounding box must be entered in ints (whole coordinates) so i.e. 10 5 -1 8.

Downloading could take a while.


Assuming the download was succesfull we can now start the import:


<CONTINENT> and bounding box should be the same as in Download.

<EMPTY/NONEMPTY> enter empty if you want to empty the database. Enter nonempty if you want to start the import.


Go into the server directory.

Modify altitude-pg.apache2-site-template and create a vhost with it.