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

Armin Burger armin.burger at territoriumonline.com
Thu Dec 13 13:02:26 EST 2001


Steve,

my question was, if there's an expression for the *internal* ID of a
shapefile that I can use for the class/filteritem, just like the [shpidx]
for templates. I.e., an item that is no standard visible field of the
attribute table. [shpidx] does just that, but it is the expression for the
templates, and will not work as class/filteritem.

Thanks

Armin


> 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