[mapserver-users] filtering features of layer by quarries in attribute table

Oz Nahum nahumoz at gmail.com
Fri Nov 21 11:04:19 PST 2008


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



More information about the MapServer-users mailing list