0

I'm trying to filter items at a WFS3 GET endpoint served by a QGIS Server project (single layer - single PostGIS table) using the OGC Common Query Language.

While this is working perfectly fine, returning me only those items where dataset_id=5:

<base_URL>/wfs3/collections/collection1/items.json?dataset_id=5

none of the following queries (<=) are working:

.../items.json?dataset_id<=5
.../items.json?"dataset_id"<=5
.../items.json?filter-lang=cql-text&FILTER:dataset_id<=5
.../items.json?filter-lang=cql-text&FILTER:"dataset_id"<=5
.../items.json?filter-lang=cql-text&FILTER=dataset_id<=5
.../items.json?filter-lang=cql-text&FILTER="dataset_id"<=5

(I replaced <base_URL>/wfs3/collections/collection1 by ... for readability)

even those (=) are not working:

.../items.json?filter-lang=cql-text&FILTER:dataset_id=5
.../items.json?filter-lang=cql-text&FILTER:"dataset_id"=5
.../items.json?filter-lang=cql-text&FILTER=dataset_id=5
.../items.json?filter-lang=cql-text&FILTER="dataset_id"=5

Is there anything I can do to properly filter out all the features with a dataset_id lower or equal to 5?

Hint; the next step would be to filter out those features with a dataset_id between 4 (included) and 8 (included). But I'm not having more success for the moment.

Browser: Firefox 96.0.1 (64-bit).

Doc: Part 1 - Core: https://docs.opengeospatial.org/is/17-069r3/17-069r3.html
Part 3 - Filtering using CQL: https://portal.ogc.org/files/96288

EDIT

QGIS Server
Conformance Classes
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson

6
  • 1
    What conformance classes portal.ogc.org/files/96288#_conformance that server supports?
    – user30184
    Jan 23 at 21:05
  • Okay, I think I get it. But how exactly would both the CQL conformance classes be referenced by the QGIS Server project at /wfs3/conformance if they were available? And could I make them available within QGIS (is there an option to check somewhere?) Jan 23 at 21:09
  • Simple CQL as one class and each supported enhancement separately.
    – user30184
    Jan 23 at 21:18
  • I think they would be represented using something close these URLs: http://www.opengis.net/spec/ogcapi-features-3/0.0/conf/cql-json and http://www.opengis.net/spec/ogcapi-features-3/0.0/conf/cql-text respectively. Jan 23 at 21:32
  • Those would mean the supported query languages.
    – user30184
    Jan 23 at 21:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.