Can a MapServer client set the DATARANGE via QueryString -


i have raster layer data values between 1.7 , 34.6 (data geotiff 1 band of float32). have simple style(below) render data in grayscale. adjusting datarange, can filter data range of interest. there way caller specify datarange on query string?

class   style     colorrange 0 0 0 255 255 255     datarange 25 30   end end 

i’ve tried adding “&map.layer[0].class[0].style[0]=datarange+20+30” query string, error:

loadstyle(): unknown identifier. parsing error near (datarange):(line 1)

warning: haven't tried myself.

expanding on "basic example" in runtime substitution section of http://mapserver.org/cgi/runsub.html#runsub, suggest modification.

validation     'default_lowlimit' '25'     'default_highlimit' '35'     'lowlimit' '[0-9]+'     'highlimit' '[0-9]+' end class   style     colorrange 0 0 0 255 255 255     datarange '%lowlimit' '%highlimit'   end end 

the default_ lines in validation block assign default values. non-default_ lines give regular expressions match incoming values. query string contains &lowlimit=25&highlimit=30.

i'm not thrilled testing numeric values regex. , sample allows highlimit less lowlimit. gets started.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -