[mapserver-users] attributes from *.dbf file

Stepan Kafka stepan.kafka at centrum.cz
Wed Apr 3 02:14:18 EST 2002


The states must be quoted in the expression, e.g.:

 EXPRESSION ("[STATE]" = "Alaska" and [LEVEL] > 3 and [LEVEL] < 6 )


Stepan Kafka


> -----Pùvodní zpráva-----
> Od: owner-mapserver-users at lists.gis.umn.edu
> [mailto:owner-mapserver-users at lists.gis.umn.edu]za uživatele Alexander
> Shostko
> Odesláno: 3. dubna 2002 7:17
> Komu: mapserver-users at lists.gis.umn.edu
> Pøedmìt: [mapserver-users] attributes from *.dbf file
>
>
> Dear mapserver users!
>
> Thanks in advance for the help!
>
> If there are a attributes defined for each shape in *.dbf file,
> let's say STATE and LEVEL. State is a string and level is an
> integer.  I need to use it from the map file to set the color.
> Is it sufficient to use the expression , for ezample:
>
> CLASS
>   EXPRESSION ([STATE] = &#8220;Alaska&#8221; and [LEVEL] > 3 and
> [LEVEL] <
> 6 )
>   COLOR 255 0 0
> END
> CLASS
>   EXPRESSION ([STATE] = &#8220;Virginia&#8221; and [LEVEL]  > 6
> and [LEVEL]
> < 9 )
>   COLOR 0 255 0
> END
>
> Well, I tried , it does not do anything. But even if it does,
> does it set the color for each shape in the layer? (Not sure)
>
> Thanks a lot
> Alexander Shostko
> shostko at ureach.com
>
>




More information about the mapserver-users mailing list