Created
November 24, 2019 23:04
-
-
Save kampar/85bc62ddce8823305026c260e1b44bb3 to your computer and use it in GitHub Desktop.
Snippet for UMS MapServer color ramp raster NDVI to mimic Sentinel-Hub NDVI color ramp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LAYER | |
#... # | |
CLASS | |
EXPRESSION ([pixel] >= -1 AND [pixel] < -0.5) | |
STYLE | |
#ramp from 0d0d0d to bfbfbf | |
COLORRANGE 13 13 13 191 191 191 | |
DATARANGE -1 -0.5 | |
RANGEITEM "pixel" | |
END #STYLE | |
END #end class | |
CLASS | |
EXPRESSION ([pixel] >= -0.5 AND [pixel] < -0.2) | |
STYLE | |
#ramp from bfbfbf to dbdbdb | |
COLORRANGE 191 191 191 219 219 219 | |
DATARANGE -0.5 -0.2 | |
RANGEITEM "pixel" | |
END #STYLE | |
END #end class | |
CLASS | |
EXPRESSION ([pixel] >= -0.2 AND [pixel] < -0.1) | |
STYLE | |
#ramp from dbdbdb to ebebeb rgb(235, 235, 235) | |
COLORRANGE 219 219 219 235 235 235 | |
DATARANGE -0.2 -0.1 | |
RANGEITEM "pixel" | |
END #STYLE | |
END #end class | |
CLASS | |
EXPRESSION ([pixel] >= -0.1 AND [pixel] < 0.0) | |
STYLE | |
#ramp from ebebeb rgb(235, 235, 235) to fffacc rgb(255, 250, 204) | |
COLORRANGE 235 235 235 255 250 204 | |
DATARANGE -0.1 0.0 | |
RANGEITEM "pixel" | |
END #STYLE | |
END #end class | |
CLASS | |
EXPRESSION ([pixel] >= 0 AND [pixel] < 0.2) | |
STYLE | |
#ramp from fffacc rgb(255, 250, 204) to 80b347 rgb(128, 179, 71) | |
COLORRANGE 255 250 204 128 179 71 | |
DATARANGE 0 0.2 | |
RANGEITEM "pixel" | |
END #STYLE | |
END #end class | |
CLASS | |
EXPRESSION ([pixel] >= 0.2 AND [pixel] < 0.6) | |
STYLE | |
#ramp from 80b347 rgb(128, 179, 71) to 0f540a | |
COLORRANGE 128 179 71 15 84 10 | |
DATARANGE 0.2 0.6 | |
RANGEITEM "pixel" | |
END #STYLE | |
END #end class | |
CLASS | |
EXPRESSION ([pixel] >= 0.6 AND [pixel] < 1) | |
STYLE | |
#ramp from 0f540a to 004500 | |
COLORRANGE 15 84 10 0 69 0 | |
DATARANGE -0.2 1 | |
RANGEITEM "pixel" | |
END #STYLE | |
END #end class | |
END # LAYER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment