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.
At the moment, you have the choice between two different distribution types:
Previous versions can be found at the download page.
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.
apt-get install python-setuptools;, but I guess you want to use the Debian package instead. For other operating systems, have a look here)
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:
apt-get install python-matplotlib; Windows users, have a look here)
apt-get install python-beautifulsoup; Windows users, have a look here)
apt-get install python-numpy; Windows users, have a look here.)
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.
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.
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
which will install the stuff on your system.
sudo python setup.py install
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.
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.49-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/
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:
pythonto e. g.
c:\python27. I used the Windows installer from python.org. For other versions, including the 64-bit version, look here.
python-setuptools. I used the setuptools-0.6c11 Windows installer for python 2.7 from python.org. See the python.org setuptools page for other versions or instructions how to install setuptools on a 64-bit machine.
python-matplotlib. I used the matplotlib 1.1.0 Windows installer for python 2.7. Look here for other versions, including the 64-bit versions.
python-numpy. I used the numpy 1.6.1 Windows installer for python 2.7. For other versions, have a look here.
python-beautifulsoupsources. I used the version 3.2.0 archive.
c:\python27\python.exe setup.py install
c:\python27\python.exe setup.py install
Now you should have a working phyghtmap installation. The phyghtmap
executable is located under
For information how to use phyghtmap, see the online manpage or say either
I guess that should be enough to successfully run phyghtmap. If not, send me a note at my OSM user page.