mapscript and logical expressions

Trevor Banister Banister at BANISTER.COM
Fri Feb 4 10:28:34 EST 2000


I solved this by using some convoluted regular expressions.

i.e.
Results between 1000 and 1999
[1][0-9][0-9][0-9]

I posted some more detailed examples to the list a few months ago if you
want to dig through the archives. (I was working at Space Imaging at the
time so they are from tbanister at spaceimaging.com)

Trevor


-----Original Message-----
From: Robert Chavez [mailto:rchavez at perseus.tufts.edu]
Sent: Friday, February 04, 2000 7:39 AM
To: mapserver-users at lists.gis.umn.edu
Subject: mapscript and logical expressions



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