[mapserver-dev] RFC 118 - Vendor-specific WMS FILTER parameter

Daniel Morissette dmorissette at mapgears.com
Thu Feb 9 08:08:07 PST 2017


Hi Jukka,

You raise very good questions from an OGC interoperability standpoint, 
but to be honest I am not sure I have the answers to those questions. 
The goal of the RFC is simply to take whatever is supported by the 
current MapServer code in a WFS GetFeature FILTER and make it work in a 
WMS GetMap FILTER. This has the benefit that client-side code that 
builds OGC filters for WFS can apply the same filter to the 
corresponding WMS layers (and I'm told there is code for doing that 
already).

The examples in the RFC are taken from the msautotest suite, so the 
simpler filters without namespace are definitely supported by MapServer. 
I presume that it doesn't hurt to provide the full namespace stuff and I 
actually see that this case is tested for WFS 2.0.0 in msautotest, but 
to be fair I do not plan to do a full suite of OGC filter 
interoperability testing. Just planning to use the current filter 
implementation as is.

With respect to SRS and axis swapping, there is code in the WFS Filter 
stuff that takes care of the swap of coordinates if necessary for WFS 
1.1 and up, and I plan to have that handled the same way for WMS 1.3 and 
up. The code seems to use the SRS of the request as the default if none 
is provided in the filter.

You're right about the fact that if no WFS is available for a given 
service then you'll have no way to discover the geometry and attribute 
names without a WFS DescribeFeatureType. I'll add a mention of that in 
the limitations.

The updated RFC is at
   http://mapserver.org/development/rfc/ms-rfc-118.html

Thank you very much for the feedback. Does this address your concerns 
with the understanding that the goal is simply to reuse the existing 
filter stuff in the WMS context?

Daniel

P.S. CQL_FILTER would be very nice and maybe we should plan to add that 
at some point, but that would require new developments beyond the scope 
of this RFC. Thank you for pointing that out, I'll definitely keep it in 
mind.




On 2017-02-09 3:48 AM, Rahkonen Jukka (MML) wrote:
> Hi,
>
> I doubt anybody is using the FILTER vendor option with Geoserver because it supports CQL_FILTER  which is much less painless to use
> http://docs.geoserver.org/latest/en/user/filter/ecql_reference.html#filter-ecql-reference
> http://docs.geoserver.org/latest/en/user/tutorials/cql/cql_tutorial.html#cql-tutorial
>
> I guess that OGC XML filter is easier to implement for us. It seems by the RFC that these filters could be simplified when it comes to namespaces which makes them shorter and easier to write even the same filter would not work with schema validating servers:
>
> Mapserver filter:
> <Filter><DWithin><PropertyName>Geometry</PropertyName><gml:Point><gml:coordinates>-60.18,46.10</gml:coordinates></gml:Point><Distance units='dd'>0.05</Distance></DWithin></Filter>
>
> Geoserver filter:
> filter=%3CFilter%20xmlns:gml=%22http://www.opengis.net/gml%22%3E%3CIntersects%3E%3CPropertyName%3Ethe_geom%3C/PropertyName%3E%3Cgml:Point%20srsName=%224326%22%3E%3Cgml:coordinates%3E-74.817265,40.5296504%3C/gml:coordinates%3E%3C/gml:Point%3E%3C/Intersects%3E%3C/Filter%3E
>
> This reminds me about one practical problem with using OGC filters for spatial queries: User should know the name of the geometry field. If WFS is not active then Mapserver users do not have any way to know what name to use because we do not support DescribeLayer, or do we?
> However, Mapserver does internally know what geometry to use and also WFS BBOX query works as KVP without giving the name of the geometry column.
>
> Suggestion: do not require PropertyName in spatial filters, or accept anything
> <PropertyName>Foo</PropertyName>
>
> The example is GML2, would filter be limited to that or should it support also GML3? That would bring troubles, not least with srsName and axis order. How about srsName and default projection? If srsName is not given with the geometry in filter, is it interpreted to be the same as the SRS/CRS of GetMap?
>
> -Jukka Rahkonen-
>
>
>
>
> ________________________________________
> Daniel Morissette wrote:
> [mapserver-dev] RFC 118 - Vendor-specific WMS FILTER parameter
>
> Hi Devs,
>
> FYI I just added RFC 118 about the addition of a vendor-specific FILTER
> parameter in the WMS interface to allow easier filtering of GetMap and
> GetFeatureInfo requests by client-side JS applications:
>
> http://mapserver.org/development/rfc/ms-rfc-118.html
>
> I will leave the RFC open for discussions for the next few days and will
> be working on this during the code sprint this week.
>
> Daniel
> --
> Daniel Morissette
> http://www.mapgears.com/
> T: +1 418-696-5056 #201
>
> http://evouala.com/ - Location Intelligence Made Easy
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
>


-- 
Daniel Morissette
http://www.mapgears.com/
T: +1 418-696-5056 #201

http://evouala.com/ - Location Intelligence Made Easy


More information about the mapserver-dev mailing list