mapscript and logical expressions

Trevor Banister Banister at BANISTER.COM
Fri Feb 4 09:46:10 PST 2000


Having multiple expression items would keep me from having to define
multiple layers as a work around, and there are some expressions that
wouldn't lend themselves to the multiple layer workaround (cites > Y people
and < X square miles)
I'd use it.

Trevor Banister
President
Banister Consulting and Online Services
Banister at Banister.com

-----Original Message-----
From: Stephen Lime [mailto:steve.lime at dnr.state.mn.us]
Sent: Friday, February 04, 2000 10:28 AM
To: rchavez at perseus.tufts.edu
Cc: mapserver-users at lists.gis.umn.edu
Subject: Re: mapscript and logical expressions


The replacements for logical expressions are case sensitive just like when
using
mapserver templates. Most shapefiles use all caps for item names so try
[ZV2] instead
of [Zv2]. Note, as of 3.3.006 you can't change class EXPRESSION or TEXT
values from
within mapscript. Still figuring out the most robust way to distinguish
between expression
types without firing up the lexer.

Also note that CLASSITEM is unused with logical expressions at present.
Curiously, how
common are multiple item logical expressions in user's plans? By only
allowing a single
item logical expressions would speed up a bit. Any thought?

Steve

Stephen Lime
Internet Applications Analyst

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

>>> Robert Chavez <rchavez at perseus.tufts.edu> 02/04/00 08:38AM >>>

Greetings,

I've just gotten around to trying the new logical expressions in classes
and I'm having trouble getting results.  Utimately I want to use logical
expresssions with ranges of numbers, but I tried these simple examples
with string, regex, and logical expressions just to test the various
expression options (using mapscript from the latest release 3.3.006):

<snip>
NAME Contours
  TYPE LINE
  STATUS OFF 		#mapscript handles status change 
  DATA contourlines1
  MAXSCALE 4000000
  CLASSITEM "Zv2"
  CLASS
    NAME "Contour lines"
    #EXPRESSION "914"  works, returns contours at this elevation
    #EXPRESSION /^914/ works, returns contours beginning with string 914
    #EXPRESSION ([Zv2] eq '914') doesn't work, returns nothing 
...
</snip>

I've tried a couple variations of the logical expression, but still no
luck.  Does anyone have any ideas?

Thanks,

Rob Chavez
Perseus Project
rchavez at perseus.tufts.edu 




More information about the MapServer-users mailing list