[mapserver-users] Classify raster image

Daniel Morissette morissette at dmsolutions.ca
Thu Jun 21 11:26:45 EDT 2001


Berend Veldkamp wrote:
> 
> Hi,
> How do I classify a raster image, like:
>  0-10 -> red
> 10-20 -> orange
> 20-30 -> yellow
> 
> I know I can reclassify the tiff images, but can this also be done
> on-the-fly.


I think you can use the special attribute name "VALUE" to represent the
pixel values in your class expressions... so the following should
hopefully work:

  CLASSITEM "VALUE"
  CLASS
    EXPRESSION ([VALUE] < 10)
    COLOR 255 0 0
  END
  CLASS
    EXPRESSION ([VALUE] < 20)
    COLOR ...
  END
  CLASS
    EXPRESSION ([VALUE] < 30)
    COLOR ...
  END


-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.



More information about the mapserver-users mailing list