phyghtmap

Contents

What is phyghtmap?

phyghtmap is a little program which lets you easily generate OSM contour lines from NASA SRTM data. It was initially created as replacement for srtm2osm which stopped working when the NASA switched their download server and started distributing the raw SRTM data via http instead of ftp. In the meanwhile, srtm2osm is working again due to the efforts of bomm.

However, phyghtmap has some advantages compared to srtm2osm. One is that you won't need a C# runtime environment installed on your machine. This corresponds to another advantage: You will need to have python installed on your machine. Another important thing is that phyghtmap generates already tiled data. Furthermore, phyghtmap seems to slightly outperform srtm2osm. If you are using a multi-core machine and are running a POSIX compliant operating system you will save much time by a simple parallelization.

Starting from phyghtmap version 1.2, there is the possibility to use data from www.viewfinderpanoramas.org. This covers void areas of the NASA SRTM data, e. g. in the high alps or high asia etc. as well as data north of 60 degrees of latitude of north. For an overview which areas are covered by these data, have a look at viewfinderpanorama's 3 arc seconds coverage map and the corresponding 1 arc second coverage map. For information how to use this, see the Usage section.

Starting from phyghtmap 1.30, single file output and gzip-compressed output are possible.

Phyghtmap 1.40 introduces pbf output support as well as polygon support.

Note that the intended use is not to upload generated contour OSM data to the OSM servers but to use it for fancy maps.

Download

At the moment, you have the choice between two different distribution types:

Previous versions can be found at the download page.

Dependencies

I tested the installation process under Windows. If you want to install phyghtmap on a Windows machine, go down to the Windows installation section.

The installation process requires python and a working python setuptools installation. The setup will use ez_setup which is included within this distribution.

The program itself should run with python >= 2.4 and < 3.0 (Windows users, take a look here). Some additional dependencies have to be installed on your system in order to run phyghtmap:

Notes for Windows users

I did some testing on Windows. Look here. If there are problems, please tell me at my OSM user page.

If you are looking for python binaries for Windows systems, maybe also have a look here.

Notes for Mac OS X users

There is a problem with the matplotlib installation on Mac OS X systems. The workaround is to use the Enthought Python Distribution which already comes with the setuptools, matplotlib and numpy libraries.

Please note that I did not do any testing on Mac OS X. I just suppose it should work. If not, please tell me at my OSM user page.

Installation

Source Distribution

If you are not running a Debian-like system, you will want to have the source distribution. This is especially true, if you want to use phyghtmap on a Windows machine. If so, go down to the seperate Windows installation section.

To install phyghtmap, unpack the source file, chdir to the unpacked source directory and then say

sudo python setup.py install
which will install the stuff on your system.

If you are not a Windows user and have no sudo installed, I guess you know what to do.

If you don't have the permissions to globally install phyghtmap but want to use it anyway, you may want to set up a virtual python environment and install phyghtmap there. If so, take a look here.

Debian package

On Debian-like operating systems, you will want to use the .deb package.

To install it, as usual just say

sudo dpkg -i phyghtmap_1.50-1_all.deb

and you are done if your alternatives define python 2.6 or 2.7 as the default. If you want to use a version of phyghtmap older than 1.46 with python 2.7, you have to copy the needed modules manually to the corresponding dist-packages directory:

sudo cp -R /usr/lib/python2.6/dist-packages/phyghtmap* /usr/lib/python2.7/dist-packages/

Windows Installation

I successfully went through the installation process on a Windows machine. The machine was running the 32-bit version of Windows XP. I used python 2.7, but I suppose any newer version < 3 should work in the future. Below, the installation process using python 2.7 is described. If you want to use a newer python version, be sure to select the corresponding library versions. The windows installation worked with phyghtmap 1.42. phyghtmap 1.30 will not properly work.

Here is how I got it working:

Now you should have a working phyghtmap installation. The phyghtmap executable is located under c:\python27\Scripts\phyghtmap.exe.

Usage

For information how to use phyghtmap, see the online manpage or say either

man phyghtmap

or

phyghtmap --help

I guess that should be enough to successfully run phyghtmap. If not, send me a note at my OSM user page.