[mapserver-users] Shape ID in FILTER/CLASS EXPRESSION?

Stephen Woodbridge woodbri at swoodbridge.com
Thu Dec 13 09:31:57 PST 2001


Armin,

Yes, you can set CLASS membership via CLASSITEM and EXPRESSIONs as
below. The MAPFILE Reference doc has more information on this. This is
an extract from my 3.5 map file which filters on CFCC codes:

LAYER
  NAME landpt
  TYPE POINT
  MAXSCALE 100000
  DATA us/25017/landpt
  STATUS ON
  CLASSITEM "CFCC"

  CLASS # schools
    EXPRESSION /D43/
    OUTLINECOLOR 0 0 0
    COLOR 220 220  5
    SYMBOL 'square'
    SIZE 7
  END
  CLASS # government buildings, Armory, Fire Station, PO, etc
    EXPRESSION /D65/
    COLOR 200 75 200
    SYMBOL 'circle'
    SIZE 7
  END
  CLASS # Cemetery
    EXPRESSION /D82/
    COLOR 255 0 0
    SYMBOL 'cemetery'
    SIZE 7
  END
END

-Steve


Armin Burger wrote:
> 
> Hello everybody,
> 
> with the template tag [shpidx] I can retrieve the feature ID for a selected
> feature of a shapefile in the query template. Is there anything similar for
> the FILTERITEM or CLASSITEM definition of the map file, like CLASSITEM
> "shpidx"?
> 
> Armin
> --
> Armin Burger
> Territorium Online
> Siemensstrasse/Via Siemens 19 - 39100 Bozen/Bolzano - Italia



More information about the MapServer-users mailing list