Quantcast

Trying to get nodata in GeoTIFF to display as transparent

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Trying to get nodata in GeoTIFF to display as transparent

bovermyer
This post was updated on .
Per the topic, I'm trying to get nodata areas that currently display as black in GeoServer/WMS to display as transparent. The GeoTIFFs in question have three bands - red, green, and blue - each with a NoData value of 0.0.

I suspect I need to use SLD to do this, but I can't find any information on using SLD to just make nodata areas transparent and leave the color bands alone.

Please help!

// Edit: Also, adding transparent=true to the WMS request does nothing.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trying to get nodata in GeoTIFF to display as transparent [SOLVED!]

bovermyer
I've solved this issue. In case anyone has a similar problem, here's how I fixed it:

* Installed FWTools
* In FWTools Shell, navigated to the directory containing the GeoTIFF files
* In FWTools Shell, ran the following command on each file:

gdalwarp -srcnodata 0 -dtsalpha input.tif output.tif

This added a fourth band to each image containing an alpha layer, and gave me my transparency in GeoServer.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trying to get nodata in GeoTIFF to display as transparent [SOLVED!]

ivan.price
legend !

many thanks for that, works like a charm (with the -dtsalpha  typo => -dstalpha)

-i
Loading...