I’ve been trying to use ShadedRelief on a DEM that is a Vector Mosaic layer. I know it is flagged as “not yet implemented in GeoServer” but it clearly almost works perfectly so I’m wondering if there’s any path to completion for this raster symbolizer? Or maybe my layer configuration or SLD is not correct?
I’m having two issues with the feature,
- Random black tiles are rendered in areas with no data (not all of them, just some)
- Black areas are rendered within the DEM area where there is no data
It seems that after transformation, some areas with no data do not have the “no-data” value? My no-data value is -99999. My layer is configured with background values and the null values for -99999.
I’m also using env substitution but that does not appear to be a factor.
This is my SLD:
<?xml version="1.0" encoding="UTF-8"?>
<NamedLayer>
<Name>elevation_hillshade</Name>
<UserStyle>
<Title>Elevation + Hillshade</Title>
<FeatureTypeStyle>
<Rule>
<RasterSymbolizer>
<Opacity>1.0</Opacity>
<ChannelSelection>
<GrayChannel>
<SourceChannelName>1</SourceChannelName>
</GrayChannel>
</ChannelSelection>
<ColorMap type="ramp">
<ColorMapEntry color="#000000" quantity="-99999" opacity="0.0"/>
<ColorMapEntry color="${env('c0', '#d73027')}" quantity="${env('q0', 0)}" opacity="1.0"/>
<ColorMapEntry color="${env('c1', '#fc8d59')}" quantity="${env('q1', 714)}" opacity="1.0"/>
<ColorMapEntry color="${env('c2', '#fee090')}" quantity="${env('q2', 717)}" opacity="1.0"/>
<ColorMapEntry color="${env('c3', '#e0f3f8')}" quantity="${env('q3', 720)}" opacity="1.0"/>
<ColorMapEntry color="${env('c4', '#91bfdb')}" quantity="${env('q4', 723)}" opacity="1.0"/>
<ColorMapEntry color="${env('c5', '#4575b4')}" quantity="${env('q5', 726)}" opacity="1.0"/>
<ColorMapEntry color="${env('c5', '#4575b4')}" quantity="9999999" opacity="1.0"/>
</ColorMap>
<ShadedRelief>
<BrightnessOnly>false</BrightnessOnly>
<ReliefFactor>55</ReliefFactor>
</ShadedRelief>
<ContrastEnhancement>
<GammaValue>1.0</GammaValue>
</ContrastEnhancement>
</RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>