-
Notifications
You must be signed in to change notification settings - Fork 5
Getting Started with Implementation
It recommended that implementers start with fully implementing only a subset of functionality. A good place to start is
implementing only the Basic CQL2 conformance class of logical and comparison operators, defining a static Queryables
schema with no queryables advertised and the additionalProperties
field set to true
, and
only implementing CQL2 JSON. Following from that can be support for
S_INTERSECTS, defining a static Queryables schema with only the basic Item properties, and
implementing CQL2 Text. From there, other comparison operators can be implemented and a more
dynamic Queryables schema.
Formal definitions and grammars for CQL2 can be found in the OAFeat CQL2 spec includes a BNF grammar for CQL2 Text and both a JSON Schema and an OpenAPI specification for CQL2 JSON. The standalone files are:
These projects have or are developing CQL2 support:
- pygeofilter, a Python parser implementation of OGC filtering standards, handles both CQL2 Text and CQL2 JSON pgstac, a schema, functions, and Python library for storing and accessing STAC collections and items in PostgreSQL, handles CQL2 JSON
- stac-fastapi-pgstac, a Python FastAPI STAC API server with a PostgreSQL database backend, has support for the Filter Extension with CQL2 Text and CQL2 JSON, via using pygeofilter to translate CQL2 Text to CQL2 JSON and processing the CQL2 JSON with pgstac
- stac-fastapi-elasticsearch-opensearch), a Python FastAPI STAC API server with an OpenSearch or Elasticsearch database backend, has support for the Filter Extension with CQL2 JSON
- stac-server, a Node.js STAC API server with an OpenSearch database backend, has support for the Filter Extension with CQL2 JSON
- DotNetStac.Api has support for CQL2 JSON and implements Linq extensions to build expressions trees from CQL2. It also includes a default query provider for STAC object enumerables implemented in DotNetStac.
- Geotools has support for CQL2 text
- xtraplatform-spatial has support for CQL2 Text and provides an ANTLR 4 grammer
Note that the xbib CQL library (JVM) is the OASIS Contextual Query Language, not OGC CQL, and should not be used to implement this extension, as they are significantly different query languages. Stacatto uses this for their query language implementation, but it is not compliant with this extension.