Filter

specdraftimplcandidate

Filter features with CQL2 expressions.

Scope

This module provides query parameters to filter features using CQL2 (in Text or JSON encoding). Depending on the feature provider, some capabilities of CQL2 may not be supported. Specifically, in GeoPackage feature providers, queryables in a JSON column that are arrays are not supported. In PostgreSQL/PostGIS feature providers, the A_OVERLAPS operator is not supported for queryables in a JSON column.

Conformance Classes

This module implements requirements of the conformance classes Filter and Features Filter from the draft specification OGC API - Features - Part 3: Common Query Languageopen in new window as well as the conformance classes Basic CQL2, Advanced Comparison Operators, Case-insensitive Comparisons, Accent-insensitive Comparisons, Basic Spatial Operators, Spatial Operators, Temporal Operators, Array Operators, Property-Property Comparisons, CQL2 Text encoding, and CQL2 JSON encoding from the draft specification Common Query Language (CQL2open in new window. The implementation is subject to change in the course of the development and approval process of the draft.

The publication of queryables is controlled via Feature Collections - Queryables and is a prerequisite for clients to be able to determine the queryable feature properties.

Query Parameters

NameResourcesDescription
filter
Features, Vector Tile
The filter expression in the filter language declared in filter-lang. Coordinates are in the coordinate reference system declared in filter-crs.
filter-crs
Features, Vector Tile
Specifies which of the supported coordinate reference systems is used to encode coordinates in the filter expression in parameter filter. Default is WGS84 longitude/latitude (CRS84).
filter-lang
Features, Vector Tile
Language of the query expression in the filter parameter. Supported are cql2-text and cql2-json, specified in the OGC candidate standard Common Query Language (CQL2). cql2-text is an SQL-like text encoding for filter expressions that also supports spatial, temporal and array predicates. cql2-json is a JSON encoding of the same grammar, suitable for use as part of a JSON object that represents a query. The use of cql2-text is recommended for filter expressions in the filter parameter.

Configuration

Options

NameDefaultDescriptionTypeSince
buildingBlock
Always FILTER.
string
v2.0
extensionType
Deprecated See buildingBlock.
string
v2.0
enabled
false
Enable the building block?
boolean
v2.0

Examples


- buildingBlock: FILTER
  enabled: true