I have a layer in GeoServer based on a raster file (GEOTIFF) I can visualize the layer, but I want to apply dynamic filters. Before I used CQL for vector data, no problem. But not sure if the procedure is the same for raster data. First of all, I see that on the GeoServer layer preview, the option to apply a CQL Filter is not available. Bad sign I guess.
Clicking on the preview map, I can see we have 2 attributes: fid (empty) and GRAY_INDEX (from 0.0 to 10.0). GRAY_INDEX is used for layer symbolization, and no problem at all. But when I try to apply a cql_filter (with Leaflet, for example), trying all options below did not work not even one (and the error for sure is not on the JS)
cql_filter: 'GRAY_INDEX >2' cql_filter: 'GRAY_INDEX >2.0' cql_filter: 'GRAY_INDEX LIKE 2.0' cql_filter: 'GRAY_INDEX LIKE 2' cql_filter: "GRAY_INDEX >'2.0'"
There is GeoServer Raster WMS Layer update/filter like CQL, ECQL but that gives an internal error when trying to create a similar style.