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.

Phyghtmap 1.60 introduces o5m output support.

Phyghtmap 1.70 introduces the possibility to use GeoTiff files as input data.

Phyghtmap 1.80 adds login handling for NASA's earthdata site. This is needed if
you want to use SRTM version 3.0 data. Username and password can be
specified using the --earthdata-user and --earthdata-password
options, respectively. To use this, you have to create an earthdata login at
NASA's earthdata site first.
For more explanation on this, see the respective options at the
online manpage.

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:

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.

python-setuptools, if you want to install from the source distribution (on Debian-like systems, say 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:

python-gdal (since version 1.70; if you don't want to use GeoTiff input files,
you may be happy withput python-gdal;
on Debian-like systems, say apt-get install python-gdal).

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.80-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:

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.

Since phyghtmap 1.70 one can use GeoTiff files as input data. This feature requires python GDAL bindings. It happens that I don't have a Windows machine to test the installation process right now. Fortunately,
you may be haoppy without the GDAL bindings if you don't want to use GeoTiff input data.