[Geoserver-devel] [JIRA] (GEOS-9434) SLDService can generate invalid SLD for rasters with a single value

Andrea Aime created an issue

GeoServer / BugGEOS-9434

SLDService can generate invalid SLD for rasters with a single value

Issue Type:

BugBug

Assignee:

Andrea Aime

Created:

17/Dec/19 5:55 PM

Priority:

MediumMedium

Reporter:

Andrea Aime

Classifying a raster that has a uniform value (e.g., all pixels at zero) causes the generation of a SLD with a single color map entry, e.g.:


<?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" version="1.0.0">
<sld:NamedLayer>
<sld:Name>farm:raster</sld:Name>
<sld:UserStyle>
<sld:Name>Default Styler</sld:Name>
<sld:FeatureTypeStyle>
<sld:Name>name</sld:Name>
<sld:Rule>
<sld:RasterSymbolizer>
<sld:ColorMap type="intervals">
<sld:ColorMapEntry color="#000000" opacity="0" quantity="10.0"/>
</sld:ColorMap>
<sld:ContrastEnhancement/>
</sld:RasterSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>

However, that’s not a valid SLD, unless the mode is “values” (interpolation and interval based ones need at least two entries)

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100117-sha1:1cfafea)

Atlassian logo