Something like this should work: CLASS NAME 'Small' EXPRESSION ([AREA] < 1000) ... END CLASS NAME 'Medium' EXPRESSION ([AREA] >= 1000 AND [AREA] < 5000) ... END CLASS NAME 'Large' # no expression necessary since this class will catch everything >= 5000 ... END
Steve >>> "Oz Nahum" <[EMAIL PROTECTED]> 11/21/08 1:05 PM >>> Hi, I would like to have attributed of a layer, displayed according their area. For example, I want to display a simple polygon layer, which have in the attribute table the field "AREA" which is the field in meter sq. I would like to display the layer in 3 different color schemes, like - color a for AREA < 1000, color b for AREA > 1000 && AREA < 5000, and color c for AREA > 5000 . >From map server tutorial I saw I can refer to string attribute, for example: I used the files from: http://biometry.gis.umn.edu/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/example2.map&layer=states&zoom=0&mode=browse&root=/tutorial&program=/cgi-bin/mapserv.exe&map_web=template+example2-4.html Here is what I am talking about... CLASSITEM 'FEATURE' CLASS NAME 'Lakes' EXPRESSION /(^B|^C|^L|^R)./ STYLE COLOR 72 64 254 END END # CLASS CLASS NAME 'Rivers' EXPRESSION 'Stream' STYLE COLOR 136 128 255 END END # CLASS CLASS NAME 'Wetlands' EXPRESSION 'Swamp or Marsh' STYLE COLOR 195 252 255 OUTLINECOLOR 195 252 255 SYMBOL 'circle' SIZE 0 END END # CLASS END # LAYER But all my attempts to classify water bodies according to their area did not succeed. Can anyone help me? Thanks, Oz --- when one person suffers from a delusion it is called insanity. When many people suffer from a delusion it is called religion." Robert Pirsig, Zen and the Art of Motorcycle Maintenance _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
