[mapserver-users] Need help with Expression
Bistrais, Bob
Bob.Bistrais at maine.gov
Fri Sep 30 08:44:42 PDT 2011
Thanks guys,
As it turns out, it was a more complex problem than originally thought, involving two datasets. It turned out to be easier and quicker to simply make a new shapefile containing the few routes that I needed.
-----Original Message-----
From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com]
Sent: Friday, September 30, 2011 10:35 AM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Need help with Expression
On 9/30/2011 10:30 AM, Havard Tveite wrote:
> Have you seen:
>
> http://www.mapserver.org/mapfile/expressions.html
>
> Feedback on the contents of that page would be appreciated.
>
> Håvard
>
> On 9/30/2011 3:51 PM, Bistrais, Bob wrote:
>> I'm trying to create an Expression to select features in a Class,
>> MapServer 6.0.1. I want to do something such as a wildcard or a Like
>> statement, to select records with certain item values. Something
>> similar to this:
>>
>> EXPRESSION ('[RDNAME]' = 'Main%' )
>>
>> Or perhaps
>>
>> EXPRESSION ('[RDNAME]' like 'Main%')
>>
>> -neither of these formats worked for me. I checked the MS
>> documentation under Expression, but could not find the solution. Can
>> anyone shed some light on this?
>>
>
Håvard,
You can use a regular expression like:
CLASSITEM "RDNAME"
EXPRESSION /^Main\.*/
-Steve W
More information about the MapServer-users
mailing list