I have added the raster layer from GeoServer as a WMS source.
There is an HTML filter to apply changes with GeoServer Raster WMS Layer, which is not working with RasterSymbolizer, and CQL filter.
Like setFilter for a vector layer with Mapbox GL JS.
SLD:
<sld:ColorMapEntry quantity="10" label="10 min" color="#e7ecff" opacity="0.898039"/>
<sld:ColorMapEntry quantity="20" label="20 min" color="#e1f8e1"/>
<sld:ColorMapEntry quantity="30" label="30 min" color="#cff7d3"/>
<sld:ColorMapEntry quantity="40" label="40 min" color="#a9e2ae" opacity="0.941176"/>
<sld:ColorMapEntry quantity="50" label="50 min" color="#a5cba7"/>
<sld:ColorMapEntry quantity="60" label="1 hr" color="#e7d676"/>
<sld:ColorMapEntry quantity="120" label="2 hrs" color="#f2b276"/>
<sld:ColorMapEntry quantity="240" label="4 hrs" color="#e77657"/>
<sld:ColorMapEntry quantity="360" label="6 hrs" color="#be3e40"/>
<sld:ColorMapEntry quantity="720" label="12 hrs" color="#9b3234"/>
<sld:ColorMapEntry quantity="960" label="16 hrs" color="#7a2764"/>
<sld:ColorMapEntry quantity="1200" label="20 hrs" color="#531a45"/>
<sld:ColorMapEntry quantity="1400" label="> 1 day" color="#291144"/>
I have tried:
- CQL but I don't know the property value for the raster layer.
http://yourserder:8080/geoserver//wms?service=WMS&version=1.1.0&cql_filter=circle_n=circle name&request=GetMap&layers=rasterlayer:rasterlayer&styles=&bbox=bounding boxof your desire&width=768&height=492&srs=EPSG:4326&format=image%2Fpng&transparent=true&
- I have also tried a RasterSymbolizer with the env variable but it also not working.
RasterSymbolizer SLD:
<sld:ColorMap name='env'>
<sld:ColorMapEntry quantity="10" label="10 min" color="${env('10_min','#e7ecff')}" opacity="0.898039"/>
<sld:ColorMapEntry quantity="20" label="20 min" color="${env('20_min','#e1f8e1')}"/>
<sld:ColorMapEntry quantity="30" label="30 min" color="${env('30_min','#cff7d3')}"/>
<sld:ColorMapEntry quantity="40" label="40 min" color="${env('40_min','#a9e2ae')}" opacity="0.941176"/>
<sld:ColorMapEntry quantity="50" label="50 min" color="${env('50_min','#a5cba7')}"/>
<sld:ColorMapEntry quantity="60" label="1 hr" color="${env('1_hour','#e7d676')}"/>
<sld:ColorMapEntry quantity="120" label="2 hrs" color="${env('2_hour','#f2b276')}"/>
<sld:ColorMapEntry quantity="240" label="4 hrs" color="${env(4_hour), #e77657}"/>
<sld:ColorMapEntry quantity="360" label="6 hrs" color="${env('6_hour','#be3e40')}"/>
<sld:ColorMapEntry quantity="720" label="12 hrs" color="${env('12_hour','#9b3234')}"/>
<sld:ColorMapEntry quantity="960" label="16 hrs" color="${env('16_hour','#7a2764')}"/>
<sld:ColorMapEntry quantity="1200" label="20 hrs" color="${env('20_hour','#531a45')}"/>
<sld:ColorMapEntry quantity="1400" label="> 1 day" color="${env('1_day','#291144')}"/>
</sld:ColorMap>
https://localhost:8080/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=geo%3Alayer_clim_w&TILED=true&WIDTH=320&HEIGHT=320&CRS=EPSG%3A3857&FORMAT_OPTIONS=dpi%3A113&BBOX=0%2C-5009377.085697312%2C5009377.085697311%2C-9.313225746154785e-10&env=10_min:%23000000;20_min:%23000000;30_min:%23000000;40_min:%23000000;50_min:%23000000
Is there any way to apply changes to the raster layer with GeoServer?
something similar.