[gdal-dev] gdal_contour and "nodata" oceans

Maxime Guillaud maxime at mguillaud.net
Tue Feb 23 15:54:26 EST 2010


Hi all,

I am trying to have gdal_contour operate on SRTM data from CGIAR
(http://srtm.csi.cgiar.org/). The problem is that this dataset has
oceans set to "nodata". This creates ugly artifacts along the shores
(you can see an example here on the red lines:
http://www.mguillaud.net/tmp/Screenshot.png - in contrast, the blue
contour lines were generated by gdal_contour from another DEM file with
sea-level at zero - however I can not use this second data source
because it has other defects).

Now, I would like to either
1. set all "nodata" points to an arbitrary elevation (zero) directly
in the GeoTIFF file, or
2. make gdal_contour assume that nodata means elevation zero.

I would be grateful if anyone can point me to a way to do either of the
above !

cheers,
Maxime


More information about the gdal-dev mailing list