Saturday 6 August 2016

geoserver - How do I use env parameter variables in an SLD colormap?


We have data being represented by the colormap copied below. I need to use env variables to change the hard coded color steps into whatever's input to the url parameters. I know you can use to pull variable values out of the url but I'm not really sure how to use that to replace the hard coded values. The colors aren't changing, just the quantity values. The getMap url would have something like &env=step1:1.0;step2:1.5; etc...



  
1











I tried doing what http://docs.geoserver.org/latest/en/user/styling/sld-reference/rastersymbolizer.html suggested by using




but that didn't work. Geoserver throws



IllegalArgumentexception: Argument "quantityString" should not be null.



Which makes sense.



So the CQL expression didn't seem to work as I hoped. How do I get that to work or use the ogc function?


Using Geoserver 2.7.



Answer



It's been added since 2.7.1.


See release note here. Here the JIRA report.


Simone.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...