[Qgis-user] [QGIS-Server] Can we use WMS OGC and non-OGC Filter at the same time

Nicolas Boisteault nboisteault at 3liz.com
Tue Sep 8 01:00:54 PDT 2020


Hi Richard,

Officially WMS does not have a FILTER parameter but QGIS Server does [0] 
[1].

I'm building the query with OpenLayers 6 for the OGC filter part and 
hand-made Javascript for the QGIS Server filter part.

One issue I see is QGIS Server filter does not accept keywords found in 
OGC Filter (e.g. Intersects...)

I'm working on a local server so I have no public server to share.

I have tested in browser different combinations of filters with no success.


[0] : 
https://docs.qgis.org/3.10/en/docs/user_manual/working_with_ogc/server/services.html?highlight=exp_filter#filter

[1] : https://github.com/qgis/QGIS-Enhancement-Proposals/issues/104

Le 08/09/2020 à 09:45, Richard Duivenvoorde a écrit :
> Hi Nicolas,
>
> We are talking about WMS here isn't it?
>
> I am not 100% sure but I think that officially WMS does not have FILTER parameters.
>
> In SOME (combined) OGC-servers you can use them (most notably Geoserver [0]), but it is not part of the WMS spec, that only has 'simple filters'
>
> So it really depends against which server you are talking (is it public? then we can try things out).
> But IF that server works with WFS/Filter-encoding you should be able to combine those two filter in ONE, by using an 'And' clause in it.. (also part of the Filter encoding spec)
>
> Not sure where you create that filter string though in QGIS. Is it created for you or do you add it as xml somewhere?
>
> At least you could test combining those two in a browser?
>
> HTH, Regards,
>
> Richard Duivenvoorde
>
> [0] https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#filter
> [1] https://www.mapserver.org/ogc/filter_encoding.html
>
>
> On 9/8/20 9:15 AM, Nicolas Boisteault wrote:
>> Hi all,
>>
>> I have success using these two filters separately :
>>
>>    * FILTER=layer_point:"label"%20=%20%27deux%27
>>    * FILTER=<Filter><Intersects><PropertyName>geom</PropertyName><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates%20decimal="."%20cs=","%20ts="%20">40538.991563323885,6204722.933054191%203849.2179915467277,6122782.438743888%20112695.54625448585,6094653.612338859%2040538.991563323885,6204722.933054191</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></Filter>
>>
>> First filter does not accept special characters in second. Second filter is an OGC filter.
>>
>> Does someone knows if it is possible to use both filters in the same query ? Thanks.
>>
>>
>> -- 
>> Nicolas Boisteault
>> Ingénieur
>> www.3liz.com <http://www.3liz.com>
>>
>> *Tel.* 06 19 36 78 32
>> *Bureau*
>> 31, rue de l'Argenterie <https://maps.google.com/?q=31,+rue+de+l'Argenterie+34000+Montpellier&entry=gmail&source=g>
>> 34000 Montpellier <https://maps.google.com/?q=31,+rue+de+l'Argenterie+34000+Montpellier&entry=gmail&source=g>
>> *Siège social*
>> 73, allée Kleber <https://maps.google.com/?q=73,+all%C3%A9e+Kleber+Boulevard+de+Strasbourg+34000+Montpellier&entry=gmail&source=g>
>> Boulevard de Strasbourg <https://maps.google.com/?q=73,+all%C3%A9e+Kleber+Boulevard+de+Strasbourg+34000+Montpellier&entry=gmail&source=g>
>> 34000 Montpellier <https://maps.google.com/?q=73,+all%C3%A9e+Kleber+Boulevard+de+Strasbourg+34000+Montpellier&entry=gmail&source=g>
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>


More information about the Qgis-user mailing list