[mapserver-users] Problems with dynamically adding colors to grey-scale geotiffs

till plewe till.plewe at gmail.com
Thu Oct 6 20:46:09 EDT 2011


I have a reasonably large grey-scale geotiff file with elevation data
(float32). I would like to
display a colorized version of this map. The colors need to be computed
dynamically because
the data range varies considerably with the zoom factor. I am using
mapserevr 5.6.3 but am
willing to upgrade if this would solve my problems.

So far I tried the following:

IMAGETYPE      png
SIZE           740 550

LAYER
        DATA    "xxx.tif"
        NAME    xxx
        OFFSITE    255    255    255
        STATUS    ON
        TYPE    RASTER
        PROCESSING "SCALE=AUTO"
END

This works (no color of course) but seems to scale always several 256x256
pixel regions independently

Adding

CLASS
  STYLE
    COLORRANGE 255 0 0 0 0 255
    DATARANGE  0 1000
  END
END

works but not dynamically. Adding

PROCESSING "SCALE=0,1000"

also does not help. I had hoped that the data would be scaled before colors
were added but
it seems the colorization always acts on the original data values.

For now something like

DATARANGE  auto

would be enough, having mapserver compute min and max value of the selected
area and then
adding colors accordingly.

All suggestions are welcome. (Especially those which do not require writing
patches.)

Thanks in advance

- Till
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111007/9487813a/attachment.html


More information about the mapserver-users mailing list