Srtm2wayinfo

From OpenStreetMap Wiki
Jump to: navigation, search

Contents

Description

srtm2wayinfo is a program that reads OpenStreetMap files and calculates the altitude differences along each way that has a \e "highway" tag. For each segment between two junctions of highways a new relation is created. This data can be used by routers to select a way with minimum altitude difference calculate better bicycle and walking routes. Of course you could also tell it to select very hilly ways.

Download

You can get the program from SVN with this command:

svn co http://svn.openstreetmap.org/applications/utils/import/srtm2wayinfo/ 

The documentation is provided in doxygen format. Just run

doxygen

in the main directory and open the file

docs/html/index.html

in your browser. This includes user and code documentation. If you don't have doxygen installed you can also read the file "documentation.h" but it will be less comfortable.

Installation

Quick installation guide (details are provided in the documentation mentioned above)

Debian/Ubuntu As root do

apt-get install libcurl3 libcurl4-gnutls-dev libzzip-0-13 libzzip-dev libqtcore4 libqt4-dev

then in the srtm2wayinfo directory as a normal user

mkdir build
cd build
cmake ..
make

Questions

How to use already locally available SRTM data?

Point cachdir to the directory where your keep your SRTM data.

srtm2wayinfo ... --cachedir=PATH_TO_MY_SRTM_DATA ...

Probably the data have to be in the hgt.zip format.

Whish List

Bugs

 <tag k="type" v="altitude"> 

should be

 <tag k="type" v="altitude"/>

This is easily changable in relations.cpp.

Personal tools
Namespaces
Variants
Actions
site
Toolbox