what is class, expression?

Lap Lo lap at cs.wisc.edu
Sat Jun 10 12:37:26 EDT 2000


Hi, 

I am new to mapserver. I just installed mapserver 3.3. I got a copy of
demo from the web and I have trouble understanding some of the features of
Class Object.

This is a brief introduction of class object given by mapserver 3.3
documentation,

"Used to define thematic classes for a given layer and each (vector) layer
must have at least one class. In cases with more than one class,
membership is determined using attribute values and regular expressions.
Starts with the keyword class and terminates with the
keyword end."

These are my questions,

1) what is the function of a class inside the layer object?
2) Why do we need more than one class?
3) Please look at some example code below,

   CLASSITEM usclass
   CLASS
     NAME "Water & Rivers"
     EXPRESSION "421"    
     COLOR 49 117 185
     BACKGROUNDCOLOR 32 201 201
     OUTLINECOLOR 0 0 0
   END
   CLASS
     EXPRESSION "^-"
     COLOR 255 0 0
     OUTLINECOLOR 0 0 0
   END

a)what is the function of expressions? 
b)why do they have some strange values like "421"? Can I say "422"?

Thanks a lot.

Bernard




More information about the mapserver-users mailing list