Case-insensitive expressions

Daniel Morissette dmorissette at DMSOLUTIONS.CA
Tue Jul 12 15:15:59 EDT 2005


Hi,

FYI, in bug 1381 we are about to add support for case-insensitive 
expressions in MapServer. This will not affect any existing mapfiles, 
here is a summary of what we'll do:

By default, matches on all 3 types of expressions (constants, regex and 
logical) are case-sensitive (they have always been). The following 
syntax will be used in the mapfile to indicate case-insensitive matches:

For constants:
   EXPRESSION "someconstant"i

For regex:
   EXPRESSION /someregex/i

For Logical:
   EXPRESSION ([attr1] IEQ 'somestring')

MapScript will also accept similar values for the setExpression() call.

Internally, a new 'flags' member will be added to the expressionObj 
struct. For now only the case-sensitivity flag will be available, with a 
value of MS_EXPR_CASEINSENSITIVE, but the idea is that if new expression 
flags are ever required we can 'or' them into the flags value.

Finally, all this is done so that the WFS PropertyIsLike operator can 
support case-insensitive matches, so this operator will also be updated.

You can track this via bug 1381:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1381

Comments, questions?

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-dev mailing list