AW: [UMN_MAPSERVER-USERS] Multiple filters with regular expressio ns in one layer

Schnitter, Stefan Stefan.Schnitter at T-SYSTEMS.COM
Sun Apr 24 18:32:24 EDT 2005


Thanx a lot,

I'd suggest to add this to the documentation. For those logical expression it currently states:

Logical expressions allow you to build fairly complex tests based on one or more attributes and therefore are only available with shapefiles. Logical expressions are delimited by parentheses "(expression)". Attribute names are delimited by square brackets "[ATTRIBUTE]". These names are case sensitive and must match the items in the shapefile. For example: EXPRESSION ([POPULATION] > 50000 AND '[LANGUAGE]' eq 'FRENCH') ... The following logical operators are supported : =,>,<,<=,>=,=,or,and,lt,gt,ge,le,eq,ne. As you might expect this level of complexity is slower to process.

Here one should add "=~" to the supported operators.

Stefan.


> -----Ursprüngliche Nachricht-----
> Von: Armin Burger [mailto:armin.burger at gmx.net] 
> Gesendet: Sonntag, 24. April 2005 23:14
> An: Schnitter, Stefan; MAPSERVER-USERS at LISTS.UMN.EDU
> Betreff: Re: [UMN_MAPSERVER-USERS] Multiple filters with 
> regular expressions in one layer
> 
> 
> Stefan,
> 
> I guess it's something like
> 
>  FILTER (('[NODE]' =~ /%mynodefilter%/) AND ('[CITY]' =~ 
> /%mycityfilter%/))
> 
> Armin
> 
> 
> > Hi all,
> 
> > Is there a possibility to have more than one filter with regular 
> > expressions in one layer?
> 
> > I understand that one can do like this with logical 
> expressions e.g.:
> 
> > [POPULATION] > 50000 AND '[LANGUAGE]' eq 'FRENCH'
> 
> > but I can only use one reg ex as a filter e.g.
> 
> > FILTERITEM NODE
> > FILTER /%mynodefilter%/
> 
> > What I'd need would be all objects from the layer where item NODE 
> > matches /%mynodefilter%/ and CITY matches /%mycityfilter%/ I use a 
> > mapserver-cgi application with simple dbf files as data source.
> 
> > Any hints and ideas are very welcome!
> 
> > Thanx in advance, Stefan.
> 
> 



More information about the mapserver-users mailing list