[mapserver-users] Using CLASS and SCALE at the same time
Axel Bayerl
axel.bayerl at r2software.net
Thu Oct 27 15:14:08 PDT 2016
Hello,
i was wondering if it is possible to use PROCESSING "SCALE=min,max",
and the output of that feed it to CLASS to classify the data.
Example:
I have a image which min and max is 0 and 5.4 respectively.
I want to SCALE it to get it in the 0-255 range.
PROCESSING "SCALE=0,5.4"
Then i want to apply a LUT, and classify the values (all with the 0-255 range)
PROCESSING "LUT=u.curve"
CLASS
NAME "0"
EXPRESSION ([pixel] = 0)
STYLE
COLOR 0 0 0
END
END
CLASS
NAME "1"
EXPRESSION ([pixel] >= 1 AND [pixel] < 3)
STYLE
COLOR 255 0 0
END
END
CLASS
NAME "2"
EXPRESSION ([pixel] >= 3 AND [pixel] < 7)
STYLE
COLOR 255 23 0
END
END
CLASS
NAME "3"
EXPRESSION ([pixel] >= 7 AND [pixel] < 11)
STYLE
COLOR 255 47 0
END
END
CLASS
NAME "4"
EXPRESSION ([pixel] >= 11 AND [pixel] < 15)
STYLE
COLOR 255 71 0
END
END
....
But when i classify the processing scale is ignored (and LUT).
In short, i want for the expression of class to manage the scaled (and
LUTed) value of the pixel, not the pixel value itself.
Thanks.
Axel.
PS: the raster is of type Float32.
More information about the MapServer-users
mailing list