On Wed, Jun 17, 2009 at 11:41 AM, <steve.tout...@inspq.qc.ca> wrote:
>
> Thanks Simon,
> Where Is that documented? Is there more options available such as number of
> intervals?
>
> Steve
>
>
> Steve Toutant, M. Sc.
> Analyste en géomatique
> Secteur environnement
> Direction des risques biologiques, environnementaux et occupationnels
> Institut national de santé publique du Québec
> 945, avenue Wolfe
> Québec, Qc G1V 5B3
>
> Tél.: (418) 650-5115 #5281
> Fax.: (418) 654-3144
> steve.tout...@inspq.qc.ca
> http://www.inspq.qc.ca
>
>
>
>
> "SIMON MERCIER" <simon.merc...@msp.gouv.qc.ca>
>
> 17/06/2009 01:37 PM
>
> A
> <steve.tout...@inspq.qc.ca>, <mapserver-users@lists.osgeo.org>
> cc
> Objet
> Rép. : [mapserver-users] color range mapping
>
>
>
>
>
>
> Hi steve, I use COLORRANGE with raster dataset and gives great results but
> never use it with vector dataset?
>
>   LAYER
>    NAME "MNE_rouge"
>    GROUP "OMBRAGE_ROUGE"
>    TILEINDEX "F:\Data\MNEOMB20K\mne"
>    TILEITEM "location"
>    TRANSPARENCY 40
>    TYPE RASTER
>    PROCESSING "SCALE=-63,1276"
>    MAXSCALE 200000
>    MINSCALE 1
>        METADATA
>            "wms_name"              "MNE_rouge"
>            "wms_server_version"    "1.1.1"
>            "wms_title"             "MNE"
>            "wms_abstract"          "(1/200 000)"
>            "wms_srs"               "EPSG:2036 EPSG:3799 EPSG:2037 EPSG:2148
> EPSG:2149 EPSG:2150 EPSG:4269 EPSG:4326 EPSG:26917 EPSG:26918 EPSG:26919
> EPSG:26920 EPSG:32183 EPSG:32184 EPSG:32185 EPSG:32186 EPSG:32187 EPSG:32188
> EPSG:32189 EPSG:32190 EPSG:32198 EPSG:42105 EPSG:42304 EPSG:900913"
>            "wms_extent"            "-1100000 -23500 1100000 2253500"
>        END
>        PROJECTION
>            "init=epsg:32198"
>        END
>
>     CLASS
>        STYLE
>            COLORRANGE 255 255 255 178 34 34
>            DATARANGE -63 1276
>        END
>    END
>  END
>

Hi Steve:

You can define a class for every one of the intervals. You can also
build a key image in advance, which will be used for buildng a legend
for a GetLegendGraphic request (currently, a gradient key image will
not be built by mapserver). In the example below each key image
contains gradient for the COLORRANGE values:


=========================
CLASS
  NAME "[-255..-200]"
  EXPRESSION ([pixel] <=-200)
  KEYIMAGE "class1.gif"
  STYLE
      COLORRANGE 64 0 0 128 0 0
      DATARANGE -255 -200
      OUTLINECOLOR 0 0 0
    END
  END
  CLASS
  NAME "[-200..-175]"
  EXPRESSION ([pixel] >-255 AND [pixel] <=-175)
  KEYIMAGE "class2.gif"
  STYLE
      COLORRANGE 128 0 0 192 64 0
      DATARANGE -255 -175
      OUTLINECOLOR 0 0 0
    END
  END
  CLASS
  NAME "[-175..-100]"
  EXPRESSION ([pixel] >=-175 AND [pixel] <=-100)
  KEYIMAGE "class3.gif"
  STYLE
      COLORRANGE 192 64 0 255 150 0
      DATARANGE -175 -100
      OUTLINECOLOR 0 0 0
    END
  END
  CLASS
  NAME "[-100..-50]"
  EXPRESSION ([pixel] >=-100 AND [pixel] <=-50)
  KEYIMAGE "class4.gif"
  STYLE
      COLORRANGE 255 150 0 240 240 10
      DATARANGE -100 -50
      OUTLINECOLOR 0 0 0
    END
  END

========================

Alex
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to