[Geoserver-users] No data in GetLegend-results

Hello all,

The issue has been already briefly discussed here https://gis.stackexchange.com/questions/270368/geoserver-getlegendgraphic-without-x-mark/389699?noredirect=1#comment638286_389699 but as that was already three years ago, I would like to get an update: is there really no way to exclude the red cross for No Data -values from the legend graphic provided by GeoServer (with GetLegendGraphic-request)? That is, of course, with the no data values still transparent on the map. Maybe somehow in the layer definition with background values, input and output transparent color, null values and/or minRange?

We have an application with many different raster mosaics from GeoServer and currently we need to maintain their legends separately with an image processing software. The legend provided by GeoServer, with all it’s configuration parameters, would be the optimal solution and save us from a lot of redundant work, but the red cross is incomprehensible to the users and, frankly, not very pretty. I can see no point in having it on the legend, as no red cross is shown on the map. Would it be possible in some future release to, instead of showing the cross for ColorMapEntries with zero opacity, simply leave them out of the legend altogether? Or maybe make it optional so that it is left out if no label is provided?

Thanks,

Sam

On Thu, 18 Mar 2021 at 11:03, Neuvonen Samuli <samuli.neuvonen@anonymised.com> wrote:

Hello all,

The issue has been already briefly discussed here https://gis.stackexchange.com/questions/270368/geoserver-getlegendgraphic-without-x-mark/389699?noredirect=1#comment638286_389699 but as that was already three years ago, I would like to get an update: is there really no way to exclude the red cross for No Data -values from the legend graphic provided by GeoServer (with GetLegendGraphic-request)? That is, of course, with the no data values still transparent on the map. Maybe somehow in the layer definition with background values, input and output transparent color, null values and/or minRange?

We have an application with many different raster mosaics from GeoServer and currently we need to maintain their legends separately with an image processing software. The legend provided by GeoServer, with all it’s configuration parameters, would be the optimal solution and save us from a lot of redundant work, but the red cross is incomprehensible to the users and, frankly, not very pretty. I can see no point in having it on the legend, as no red cross is shown on the map. Would it be possible in some future release to, instead of showing the cross for ColorMapEntries with zero opacity, simply leave them out of the legend altogether? Or maybe make it optional so that it is left out if no label is provided?

All things are possible with open source, all you need to do is convert your redundant work into coder time (https://docs.geoserver.org/latest/en/developer/) or cash (http://geoserver.org/support/) and make the change you want.

Ian