GeoServer – Creating a Transparent Raster in GeoServer

geoserver

This is a bit of a beginner question I guess but I just can't find a clear answer anywhere…

I have a projected satellite image (warped via gdal) and would like to set the no data pixels to a transparent value so that when the wms layer of my (image) coverage is added on my map only the projected image is displayed (and not the balck area around).

Is it in the sld for my layer? is it in the wms parameters? do I need a rgba image format? etc… Any pointers would be highly appreciated!

Best Answer

You need to add a ColorMap entry for the no data value in the SLD file that is set to be transparent. See https://docs.geoserver.org/latest/en/user/styling/css/cookbook/raster.html for more details.