[mapserver-users] Class Expressions

woodbri at swoodbridge.com woodbri at swoodbridge.com
Fri Sep 6 21:56:58 PDT 2002


On 6 Sep 2002 at 23:35, Steve Lime wrote:

> Funny you should ask. I committed a new version of the expression
> parser to the 3.7 and 3.6 CVS trees last night. One of the additions
> is a not operator. I've tested it mostly in conjuction with the
> REQUIRES and LABELREQUIRES context expressions but it should work fine
> otherwise. You can write things like:
> 
>   EXPRESSION (!('[TEXT]' =~ /^UNK|^N.A/))

Did you really mean to write "=~" like in perl? I do not think that 
is documented.

Did you implement != for not equal to?

> 
> There is no negation operator outside of logical expressions (yet)
> although there may be something built into regex.
> 
> I think (try it to be sure) that your last idea may work. If a CLASS
> does not have a COLOR or OUTLINECOLOR then it is skipped. If so, then
> that would be faster than the combination of logical and regular
> expressions.

I think this is working fine, at least the records I don't want are 
not on the map. I wasted about 2 hours trying to get anything to show 
up on the map because I set CLASSITEM but forgot to set LABELITEM
Boy does that make me feel dumb!

-Steve W.



More information about the MapServer-users mailing list