[OSM-dev] Contours, hillshading and void filling

Steve Hill steve at nexusuk.org
Mon Mar 1 10:14:47 GMT 2010


I'm having a go at hillshading with the SRTM data at the moment. 
Obviously the data needs to be void-filled before being shaded, so I 
looked at the gdal_fillnodata.py script that ships with gdal 1.7.1.

This script doesn't appear to work when I point it at the GeoTIFF files (I 
end up with the voids still in the output file), but it does work if I 
use .hgt files for input.  I assumed that since the .hgt files hadn't been 
processed by the srtm_generate_hdr.sh script that the resulting data would 
be incorrectly projected, but gdalinfo tells me that it contains the same 
projection data as the .tif files that srtm_generate_hdr.sh produces.

So I've been looking at srtm_generate_hdr.sh to see exactly what it does, 
and I have to say that I'm extremely confused: it appears that it creates 
a .hdr and .prj file, and then does absolutely nothing with them - the 
.tif is produced by the following:
 	cp $TILE.hgt $TILE.bil
 	gdal_translate -ot Int16 $TILE.bil $TILE.tif

Can anyone shed some light onto this?

>From reading the srtm_generate_hdr.sh comments, it seems that even without 
the correction the script is supposed to be doing, we're only talking 
about an error of around 45 metres (i.e. the difference between the centre 
and edge of a pixel) so in the grand scheme of things it probably doesn't 
matter whether it is working or not, but it would be nice to know why I'm 
bothering to run it when generating contour lines.

-- 

  - Steve
    xmpp:steve at nexusuk.org   sip:steve at nexusuk.org   http://www.nexusuk.org/

      Servatis a periculum, servatis a maleficum - Whisper, Evanescence





More information about the dev mailing list