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

Stephen Lime steve.lime at dnr.state.mn.us
Fri Dec 14 15:13:09 EST 2001


No there isn't, but there could be I think. Could you add that to bugzilla on the main site as a feature request. Note that there IS a special query mode for retrieving shapes by index. Let me know if you want details...

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Armin Burger <armin.burger at territoriumonline.com> 12/13/01 12:02PM >>>
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