Hello, I am wondering if CQL expression can be applied to a multibanded raster. I have a raster that has 10+* bands and I want to have the visualiz presentation change with input from the user. I successfully loaded the data into geoserver and each band is present in the raster.
Currently this is error I am receiving in geoserver Caused by: org.geoserver.platform.ServiceException: java.lang.IllegalArgumentException: Band number -1 is not valid. at org.geoserver.wms.map.RenderedImageMapOutputFormat.directRasterRender(RenderedImageMapOutputFormat.java:990) at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:340) ... 111 more Caused by: java.lang.IllegalArgumentException: Band number -1 is not valid. at org.geotools.renderer.lite.gridcoverage2d.BandSelectionNode.visit(BandSelectionNode.java:210) at org.geotools.renderer.lite.gridcoverage2d.ChannelSelectionNode.visit(ChannelSelectionNode.java:152) at org.geotools.renderer.lite.gridcoverage2d.RasterSymbolizerHelper.visit(RasterSymbolizerHelper.java:210) at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.symbolize(GridCoverageRenderer.java:464) at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:912) at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:750) at org.geoserver.wms.map.RenderedImageMapOutputFormat.directRasterRender(RenderedImageMapOutputFormat.java:883) ... 112 more Caused by: java.lang.NumberFormatException: For input string: "${env('bandnum',2)}" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:481) at java.lang.Integer.parseInt(Integer.java:527) at org.geotools.renderer.lite.gridcoverage2d.BandSelectionNode.visit(BandSelectionNode.java:207) Seems that CQL expressions are not supported for this yet? Is there another way I can go about it. Visualization works fine if I specify a new SLD with the SourceChannelName set to band value (0-10) <Rule> <RasterSymbolizer> <ChannelSelection> <GrayChannel> <SourceChannelName>${env('bandnum',2)}</SourceChannelName> </GrayChannel> </ChannelSelection> <ContrastEnhancement> <Normalize/> </ContrastEnhancement> </RasterSymbolizer> </Rule> -- David Haynes, Ph.D. Research Associate Terra Populus Minnesota Population Center 612-626-3933 www.terrapop.org
------------------------------------------------------------------------------
_______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users