PHYGHTMAP

Section: User Commands (1)
Updated: February 2012
Index
 

NAME

phyghtmap - NASA SRTM -> OSM xml translator  

SYNOPSIS

phyghtmap [options] [<hgt file>] [<hgt files>]  

DESCRIPTION

phyghtmap generates contour lines from NASA SRTM data. It takes at least an area definition as input. It then looks for a cache directory (./hgt/) and the needed SRTM files. If no cache directory is found, it will be created. It then downloads all the needed NASA SRTM data files automatically if they are not cached yet. There is also the possibility of masking the NASA SRTM data with data from www.viewfinderpanoramas.org which fills voids and other data lacking in the NASA data set.  

OPTIONS

-h, --help
show this help message and exit
-a LEFT:BOTTOM:RIGHT:TOP, --area=LEFT:BOTTOM:RIGHT:TOP
choses the area to generate osm SRTM data for by bounding box. If necessary, files are downloaded from the NASA server (http://dds.cr.usgs.gov/srtm/version2_1/SRTM[1|3]). Specify as <left>:<bottom>:<right>:<top> in degrees of latitude and longitude, respectively. Latitudes south of the equator and longitudes west of Greenwich may be given as negative decimal numbers. If this option is given, specified hgt files will be omitted.
--polygon=FILENAME
use polygon FILENAME as downloaded from http://download.geofabrik.de/clipbounds/ as bounds for the output contour data. The computation time will be somewhat higher then. If specified, a bounding box passed to the --area option will be ignored.
-s STEP, --step=STEP
specify contour line step size in meters. The default value is 20.
-o PREFIX, --output-prefix=PREFIX
specify a prefix for the filenames of the output osm file(s).
-p PLOTPREFIX, --plot=PLOTPREFIX
specify the prefix for the files to write longitude/latitude/elevation data to instead of generating contour osm.
-c ELEVATION_MAJOR,ELEVATION_MEDIUM, --line-cat=ELEVATION_MAJOR,ELEVATION_MEDIUM
specify a string of two comma seperated integers for major and medium elevation categories, e. g. '200,100' which is the default. This is needed for fancy rendering.
-j NJOBS, --jobs=NJOBS
number of jobs to be run in parallel (POSIX only)
--osm-version=OSM-VERSION
pass a number as OSM-VERSION to use for the output. The default value is 0.5 since this saves disk space. If you need a newer version, try 0.6.
--write-timestamp
write the timestamp attribute of output OSM XML node and way elements. This might be needed by some interpreters.
--start-node-id=NODE-ID
specify an integer as id of the first written node in the output OSM xml. It defaults to 10000000 but some OSM xml mergers are running into trouble when encountering non unique ids. In this case and for the moment, it is safe to say 10000000000 (ten billion) then.
--start-way-id=WAY-ID
specify an integer as id of the first written way in the output OSM xml. It defaults to 10000000 but some OSM xml mergers are running into trouble when encountering non unique ids. In this case and for the moment, it is safe to say 10000000000 (ten billion) then.
--max-nodes-per-tile=MAXNODESPERTILE
specify an integer as a maximum number of nodes per generated tile. It defaults to 1000000, which is approximately the maximum number of nodes handled properly by mkgmap. For bigger tiles, try higher values. For a single file output, say 0 here.
--max-nodes-per-way=MAXNODESPERWAY
specify an integer as a maximum number of nodes per way. It defaults to 2000, which is the maximum value for OSM api version 0.6. Say 0 here, if you want unsplitted ways.
--gzip=COMPRESSLEVEL
turn on gzip compression of output files. This reduces the needed disk space but results in higher computation times. Specifiy an integer between 1 and 9. 1 means low compression and faster computation, 9 means high compression and lower computation.
--pbf
write protobuf binary files instead of OSM XML. This reduces the needed disk space. Be sure the programs you want to use the output files with must be capable of pbf parsing. The output files will have the .osm.pbf extension.
--srtm=SRTM-RESOLUTION
use SRTM resolution of SRTM-RESOLUTION arc seconds. Note that the finer 1 arc second grid is only available in the USA. Possible values are 1 and 3, the default value is 3.
--viewfinder-mask=VIEWFINDER-RESOLUTION
if specified, NASA SRTM data are masked with data from www.viewfinderpanoramas.org. Possible values are 1 and 3 (for explanation, see the --srtm option).
--corrx=SRTM-CORRX
correct x offset of contour lines. A setting of --corrx=0.0005 was reported to give good results. However, the correct setting seems to depend on where you are, so it is may be better to start with 0 here.
--corry=SRTM-CORRY
correct y offset of contour lines. A setting of --corry=0.0005 was reported to give good results. However, the correct setting seems to depend on where you are, so it may be better to start with 0 here.
-v, --version
print version and exit.
 

USAGE EXAMPLES

Here are some usage examples
phyghtmap -a 8.59:49.34:8.78:49.45
generate openstreetmap xml for the area around Heidelberg, Germany
phyghtmap -a 8.59:49.34:8.78:49.45 -o heidelberg
same as above but save data to heidelberg_*.osm files instead of automatically generated filenames
phyghtmap -a -25:62:-12:68 -o iceland
This will not work since no SRTM data is available north of 60 degrees of latitude.
phyghtmap -a -25:62:-12:68 -o iceland --viewfinder-mask=3
Yes, this works. There is data available for that area at www.viewfinderpanoramas.org.
phyghtmap -a -25:62:-12:68 -o iceland --viewfinder-mask=3 -j 16
Same as above but use 16 parallel processes for the contour line calculation.
phyghtmap -a -25:62:-12:68 -o iceland -s 10 -c 100,50
Say this, if you want contour lines for Iceland with a step size of ten meters and major contour lines every 100 meters and medium contour lines every 50 meters.
phyghtmap -a 6:44:9:47 -o high_alps --viewfinder-mask=1
With this, you get wonderful contour line .osm with a resolution of 1 arc second where data is available at www.viewfinderpanoramas.org and NASA SRTM 3 arc second data elsewhere.
phyghtmap -a 6:44:9:47 --max-nodes-per-tile=100000 --max-nodes-per-way=400
This generates contour lines for the high alps. Each output file will contain not more than 100000 nodes, each way therein will not contain more than 400 nodes.
phyghtmap -a 6:44:9:47 -j 2 --max-nodes-per-tile=0 --max-nodes-per-way=0 --gzip=9
This generates contour lines for the high alps and writes them to a single output file. Note that it is possible to use multiple processes in parallel. --max-nodes-per-way=0 means that the ways will be as long as possible. --gzip=9 will produce gzipped output with a compression level of 9.
phyghtmap -a 6:44:9:47 -j 2 --max-nodes-per-tile=0 --max-nodes-per-way=0 --gzip=9
Same as above but output will be a osm protobif binary file (.osm.pbf).
phyghtmap -s 5 NXXEYYY.hgt
Make contour line .osm with steps of 5 meters from file NXXEYYY.hgt. Note that no area was specified here, the area is read from the filename. You can use phyghtmap like this with .hgt files from sources other than NASA SRTM or www.viewfinderpanoramas.org, as long as the filenames contain the neede geographic information.
phyghtmap -p example_plotname -a 8.9:49.0:9.0:49.1
Do not generate contour line OSM xml but write a file example_plotname_*.xyz with lines containing space seperated values of longitude, latitude and elevation for each point stored in the corresponding .hgt file within the specified area. For bigger areas, you will probably get more than one output file.
 

BUGS

If you find a bug, please report it to <dempwolff@informatik.uni-heidelberg.de>.  

AUTHOR

Adrian Dempwolff <dempwolff@informatik.uni-heidelberg.de>

Markus Demleitner <msdemlei@users.sf.net>  

COPYRIGHT

Copyright (c) 2009-2011 Adrian Dempwolff, Markus Demleitner. License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
USAGE EXAMPLES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html, using the manual pages.
Time: 17:33:37 GMT, February 04, 2012