[mapserver-dev] WFS filters / FLTValidForPropertyIsLikeFilter

Martin Kofahl M.Kofahl at gmx.net
Fri Sep 17 03:18:36 EDT 2010


Hi devs,
I spent some time to find out why MapServer WFS - apart from bbox queries - always selects all records from a postgis database and uses its own filtering capabilities in stead of a sql filter.

In FLTValidForPropertyIsLikeFilter (needs to return 1 in order to be used as sql filter) the relevant clause is

    /*make sure that if there is properyisequal, it is the only one*/
    if (psFilterNode->psLeftNode == NULL && psFilterNode->psRightNode == NULL) {
      return 1;
    }
    return 0;

A single PropertyIsLike-Filter contains of 3 FilterEncodingNodes:
	psFilterNode->psRightNode->pszValue = column
	psFilterNode->pszValue= PropertyIsLike 
	psFilterNode->psRightNode->pszValue = string

What is to be said againt returning TRUE if FLTNumberOfFilterType(psFilterNode, "PropertyIsLike") == 1? And what steps have to be done in order to support multiple PropertyIsLike/Equal filters?

Kind regards
Martin


More information about the mapserver-dev mailing list