[mapserver-users] Re: Mapfile multiple CLASSITEM's
oliver.wesp at gmail.com
Mon Aug 9 09:42:04 EDT 2010
It's not possible to use more than one field in CLASSITEM but it's is
indeed possible to use more than one field in your expression, so you
don't need CLASSITEM at all.
Say you have to fields ANIMAL and ANIMALSIZE.
NAME "SMALL PIG"
EXPRESSION ([ANIMAL] = 'PIG' AND [ANIMALSIZE] = "SMALL")
COLOR 0 0 0
OUTLINECOLOR 0 0 0
NAME "BIG PIG"
EXPRESSION ([ANIMAL] = 'PIG' AND [ANIMALSIZE] = "BIG")
COLOR 0 0 0
OUTLINECOLOR 100 100 100
You still need more than one class but it does the trick.
2010/8/9 Donatas Malinauskas <donatas.malinauskas at lgt.lt>:
> Yes, Sumit, I understand - with few classes I can describe different
> animals, but the problem is that the same PIG in the map should be in
> severel different colours. The column value (eg. big pig - fills white,
> biggest pig - fills yellow, very big pig - fills red and so on) I read from
> data table...Is it possible to fill the same PIG ( in the same class) in
> different colours depending on data column value?
> Thanks :)
> Sumit Sharma [via OSGeo.org] wrote:
>> I use CLASSITEM for only one value, I think you can not use it for
>> multiple values.
>> However for your problem you can easily solve it by using expression in
>> class and color value in style
>> As for your example...
>> NAME "PIG"
>> EXPRESSION ([ANIMAL] = 'PIG')
>> ANGLE 360
>> COLOR [ANIMALCOLOR]
>> OUTLINECOLOR 0 0 0
>> SIZE 10
>> SYMBOL "YourPointSymbol"
>> WIDTH 1
>> and so on you can make other classes for different "animals"
>> Hope this will resolve your problem
>> View message @
>> To unsubscribe from Mapfile multiple CLASSITEM's, click here
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
More information about the mapserver-users