Colour by attribute values - postgis connection

Bart van den Eijnden (OSGIS) bartvde at OSGIS.NL
Sat Apr 21 05:29:38 EDT 2007


Hi Steven,

you need to use separate classes, all with 1 expression, so:

    CLASS 
      EXPRESSION "CL" 
      STYLE 
        OUTLINECOLOR 0 0 255 
      END 
    END 
    CLASS
      EXPRESSION "OO" 
      STYLE 
        OUTLINECOLOR 255 0 255 
      END 
    END

Hope this helps.

Best regards,
Bart

I have some trouble colouring by an attribute value i/c with a postgis 
connection. 
I want to colour the column cabuty by 3 unique values. 
For now I'm trying to make a layer like this: 

LAYER 
   NAME "b_cabu_postgis" 
   CONNECTIONTYPE postgis 
   CONNECTION "host=localhost port=5432 dbname=****** 
user=****** password=*******" 
   DATA "the_geom from b_cabu" 
   STATUS ON 
   TYPE POLYGON 
   DUMP TRUE 
   TEMPLATE "ttt" 
    CLASSITEM "cabuty" 
    CLASS 
          EXPRESSION "CL" 
        STYLE OUTLINECOLOR 0 0 255 
        END 
       EXPRESSION "OO" 
        STYLE OUTLINECOLOR 255 0 255 
        END 
     END 
    METADATA 
    "wms_title" "gebouwen" 
    "gml_include_items" "all" 
     END 
     PROJECTION 
     "init=epsg:31300" 
     END 
END 

Only the expression 'OO' is coloured, the objects corresponding with 
'CL' in the cabuty are not showing up...what am I doing wrong ? 

Thanks for helping out ! 

Steven 
--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl



More information about the mapserver-users mailing list