[gdal-dev] SRTM/hgt to TIFF with alpha

Roger André randre at gmail.com
Tue Apr 27 12:09:23 EDT 2010

Hi David,

Can you clip out a small section of your DEM that contains both ocean and
land and send it to me?  Your question sounds interesting, and I'd like to
take a look at the data before I comment on it.



On Wed, Apr 7, 2010 at 9:08 PM, David <dbainbridge at gmail.com> wrote:

> Hello.  I  am having a terrible time trying to figure out how to convert
> what should be value/height of 0 in the SRTM/hgt data file to the alpha
> layer in a tiff.  I was experimenting with making ocean areas transparent.
>  I tried the following with no success:
> gdalwarp -of GTiff -co "TILED=YES"  -dstalpha -srcnodata 0 -wt Float32 -ot
> Float32 -wo SAMPLE_STEPS=100 -multi N40W125.hgt test.tiff
> gdalinfo -mm gives:
> Band 1 Block=256x256 Type=Float32, ColorInterp=Gray
>    Computed Min/Max=-32768.000,1233.000
> Band 2 Block=256x256 Type=Float32, ColorInterp=Alpha
>    Computed Min/Max=0.000,255.000
> Since this may affect the hillshading for any land areas inland I was also
> going to attempt the same affect by masking the ocean after the hillshading.
> The resulting tiff in either case would be overlaid onto another layer that
> would have any land areas filled in with the resulting color that would have
> been used with height 0 in the hgt file.  I am doing this because I have a
> coastline shapefile that represents land areas but not ocean areas.
> Is my approach a good idea and/or what am I missing to mask the ocean areas
> into the alpha layer?
> Thanks for any help.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100427/a187eaa1/attachment.html

More information about the gdal-dev mailing list