[mapserver-users] Question on RASTER layer with PROCESSING SCALE=min, max
Stephen Woodbridge
woodbri at swoodbridge.com
Tue May 20 07:47:52 PDT 2014
Hi All,
I am trying to understand how a mapfile that I inherited is working.
It has a raster layer like:
LAYER
NAME "modis_east_30_60"
STATUS on
TYPE raster
PROJECTION "init=epsg:4326" END
VALIDATION 'date' '.' END
DATA "MODIS_SST_EAST/MODIS_SST_EAST-%date%.vrt"
PROCESSING "SCALE=-222,3120"
END
The .vrt references a .tif in Int16 format and assigns a color pallette
to it. The .vrt also defines itself as format Byte.
It looks like the PROCESSING directive is getting applied to the .tif
file when it is read mapping the -222 to 3120 range of values to 0-255
and then applying the color table to render the image.
The documentation is a little vague on this point and only states:
"This directive instructs the GDAL reader to pre-scale the incoming
raster data. It is primarily used to scale 16bit or floating point data
to the range 0-255, but can also be used to constrast stretch 8bit data.
If an explicit min/max are provided then the input data is stretch (or
squished) such that the minimum value maps to zero, and the maximum to
255. ..."
So it is not clear (to me anyway) if this is scaling is getting applied
when reading the .tif referenced in the .vrt or applied to the data
returned by the .vrt.
From experiments it appears to be getting applied to the .tif.
Can anyone confirm or deny this or shed any light on it?
Thanks,
-Steve W
More information about the MapServer-users
mailing list