<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Maybe I could add my own question here...
<br>I'd like to try using REGEXPs in a mapfile to do the same thing. I
have a list of hospital facilities where I'm enumerating the total number
of beds. I want to render the data based on the number of beds. I tried
evaluating the number of TOTAL_BEDS, but can only get it to work as follows.
What I'd like to do is say something like:
<br>EXPRESSION/> 400/
<br>as opposed to
<br>EXPRESSION /[4-9][1-9][0-9]/
<br>Thanks,
<br>Kieran
<p>snippet follows...
<p><tt>&nbsp;&nbsp;&nbsp; CLASSITEM TOTAL_BEDS</tt>
<br><tt>&nbsp; CLASS</tt>
<br><tt>&nbsp;&nbsp;&nbsp; NAME 'Greater than 401 Beds'</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 5</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPRESSION /[4-9][1-9][0-9]/</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0 0</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL 1</tt>
<br><tt>&nbsp; END</tt><tt></tt>
<p><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CLASS</tt>
<br><tt>&nbsp;&nbsp;&nbsp; NAME '250-400 Beds'</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 4</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPRESSION /^[2-3][5-9][0-9]$|^3[0-9][0-9]$/</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0 255</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL 1</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp; END&nbsp; # CLASS</tt>
<br>&nbsp;
<p>Stephen Lime wrote:
<blockquote TYPE=CITE>You can use dynamic expressions to do that. Let's
say you have a mapfile with
<br>a point layer called "mypoints" with a single class. You can set up
a select list
<br>to set the expression for that class:
<p>&nbsp; &lt;select name="map_mypoints_class_expression" single>
<br>&nbsp;&nbsp;&nbsp; &lt;option value="expression"> option 1&lt;/option>
<br>&nbsp;&nbsp;&nbsp; &lt;option value="expression"> option 2&lt;/option>
<br>&nbsp;&nbsp;&nbsp; ...
<br>&nbsp; &lt;/select>
<p>The expressions can be any valid MapServer (i.e. string, logical or
regular)
<br>expression. Syntax of the expression is identical to that entered in
a map
<br>file.
<p>Steve
<p>Stephen Lime
<br>Internet Applications Analyst
<p>Minnesota DNR
<br>500 Lafayette Road
<br>St. Paul, MN 55155
<br>651-297-2937
<p>>>> &lt;Alexspringer@aol.com> 02/03/01 05:06PM >>>
<br>Using the mapserver cgi, I have a point file in use.&nbsp; I would
like to add a
<br>select [drop down box] that has values for a filter to be applied to
one
<br>field in the point file dbf so that only those records with the field
value
<br>equal to that filter display.&nbsp; Does anyone have an example of
the .map and
<br>.htm that can demonstrate how this is implemented?
<p>Thank you.
<br>&nbsp;</blockquote>
</html>