You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I can see, it is not possible to style a 8 bit raster with color table using DATARANGE based on the pixel value. The expression can be based on pixel value, but it always use the red component of the looked up color from the color table as range item.
It is quite common for the pixel value to contain the raster's information, e.g. slope, and the color table is just a style setting.
It would be great if RANGEITEM "pixel" could be used with 8 bit rasters. An alternative solution would be a processing directive that would tell MapServer to ignore the rasters color table and instead generate a default gray scale color table as done today for 8 bit rasters without color table.
CLASS
NAME "Slope <= 29°"
EXPRESSION ([pixel] >= 0 AND [pixel] <= 29)
STYLE
RANGEITEM "pixel"
COLORRANGE 255 255 255 55 55 55
DATARANGE 0 29
END # STYLE
END # CLASS
I have tested this with both MapServer 7.6.1 and 8.0.0.
The text was updated successfully, but these errors were encountered:
What I can see, it is not possible to style a 8 bit raster with color table using DATARANGE based on the pixel value. The expression can be based on pixel value, but it always use the red component of the looked up color from the color table as range item.
It is quite common for the pixel value to contain the raster's information, e.g. slope, and the color table is just a style setting.
It would be great if RANGEITEM "pixel" could be used with 8 bit rasters. An alternative solution would be a processing directive that would tell MapServer to ignore the rasters color table and instead generate a default gray scale color table as done today for 8 bit rasters without color table.
I have tested this with both MapServer 7.6.1 and 8.0.0.
The text was updated successfully, but these errors were encountered: