[mapserver-users] Class Expressions

Steve Lime steve.lime at dnr.state.mn.us
Tue Sep 10 14:02:41 EDT 2002


Yes, I meant =~, although now as I think about it we probably don't need
it
and could just use =/eq or !=/ne. For now though you need to use =~
for
a regex comparison. I'll fix the parser to allow the other operators
for 3.7.

!= has always been available.

Steve

Stephen Lime
Data & Applications Manager

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

>>> <woodbri at swoodbridge.com> 09/06/02 11:56PM >>>
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