(for reference: this stemmed from ticket #2105).
MapServer currently supports the OGC Filter Encoding Specification, version 1.0.0.
Filter Encoding 1.1.0:
Specification: http://portal.opengeospatial.org/files/?artifact_id=8340)
Schemas: http://schemas.opengis.net/filter/1.1.0/
Examples: http://schemas.opengis.net/filter/1.1.0/examples/
Here is what FES 1.1.0 provides over and above FES 1.0.0:
a./ Addition of SortBy, thereby allowing a Filter expression the opportunity to specify a sortation column, either ascending or descending (ASC or DESC). Example:
<ogc:SortBy>
<ogc:SortProperty>
<ogc:PropertyName>title</ogc:PropertyName>
<ogc:SortOrder>DESC</ogc:SortOrder> </ogc:SortProperty>
</ogc:SortBy>
b./ GML Object id support, i.e.:
<Filter>
<GmlObjectId gml:id="TREESA_1M.1234"/>
</Filter>
...which isn't far from FeatureId (see ticket #2102)
Other notes:
a./ do we want to support functions (like sin, cos) and arithmetic operators (Sub, Add, etc.) ?
b./ spatial ops: which ones do we support? From FES 1.1.0:
Equals
Disjoint
Touches
Within
Overlaps
Crosses
Intersects
Contains
!DWithin
Beyond
BBOX
c./ note section 8.3 of the spec which deals with reprojecting (bscially, we process as per the underlying data's advertised projection, unless explicitly set by client (i.e. SRS in KVP, or SRS passed in Filter request). If an SRS is explicitly defined in the client's Filter packet, and not supported, then exception is thrown.
d./ comparison ops: which ones do we actually support? From FES 1.1.0:
PropertyIsEqualTo
PropertyIsNotEqualTo
PropertyIsLessThan
PropertyIsGreaterThan
PropertyIsLessThanOrEqualTo
PropertyIsGreaterThanOrEqualTo
PropertyIsLike
PropertyIsNull
PropertyIsBetween
e./ we support the logical ops (And, Or, Not)
f./ we have to now identify the GeometryOperands (i.e. gml:Point, gml:Polygon, etc.) that our filters support. Note that these must be in GML 3.1.1
g./ Note that most of the MapServer OGC codebase leverages Filter 1.0.0, with the exception of SOS (to which we've basically implemented Filter 1.1.0 without the new features (i.e. looks like Filter 1.0.0)
A big question here is how we develop this (i.e. msIO_printf or libxml2)? If the latter, do we do this only for FES 1.1.0?
My preference would be to encode just FES 1.1.0 with libxml2 and leave 1.0.0 as is.