Skip to content

Commit d610963

Browse files
committed
update spec to reference published versions of CQL2 and OAFeat Part 3 Filter specs
1 parent 6e30601 commit d610963

File tree

5 files changed

+12122
-16033
lines changed

5 files changed

+12122
-16033
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
validate:
2525
working_directory: ~/stac
2626
docker:
27-
- image: cimg/node:16.14
27+
- image: cimg/node:22
2828
steps:
2929
- checkout
3030
- save_cache:

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111

12-
- Added Basic Spatial Functions with additional Spatial Data Types definition, which defines
12+
- Added Basic Spatial Functions with additional Spatial Literals definition, which defines
1313
a class that has only S_INTERSECTS over all geometry data types
1414
- Renamed Basic Spatial Operators to Basic Spatial Functions
1515
- Renamed Spatial Operators to Spatial Functions
1616
- Renamed Temporal Operators to Temporal Functions
1717
- Renamed Array Operators to Array Functions
18+
- Accent- and Case-insensitive Comparison conformance classes have been split into two conformance classes,
19+
Accent-insensitive Comparison and Case-insensitive Comparison
20+
- Renamed Custom Function to Functions
1821

1922
## [v1.0.0-rc.3] - 2023-10-18
2023

README.md

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,18 @@
6868
- CQL2 JSON: `http://www.opengis.net/spec/cql2/1.0/conf/cql2-json`
6969
- Basic CQL2: `http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2`
7070
- Advanced Comparison Operators: `http://www.opengis.net/spec/cql2/1.0/conf/advanced-comparison-operators`
71+
- Case-insensitive Comparison: `http://www.opengis.net/spec/cql2/1.0/conf/case-insensitive-comparison`
72+
- Accent-insensitive Comparison: `http://www.opengis.net/spec/cql2/1.0/conf/accent-insensitive-comparison`
7173
- Basic Spatial Functions: `http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-functions`
72-
- Basic Spatial Functions with additional Spatial Data Types: `http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-functions-plus`
74+
- Basic Spatial Functions with additional Spatial Literals: `http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-functions-plus`
7375
- Spatial Functions: `http://www.opengis.net/spec/cql2/1.0/conf/spatial-functions`
7476
- Temporal Functions: `http://www.opengis.net/spec/cql2/1.0/conf/temporal-functions`
75-
- Custom Functions: `http://www.opengis.net/spec/cql2/1.0/conf/functions`
76-
- Arithmetic Expressions: `http://www.opengis.net/spec/cql2/1.0/conf/arithmetic`
7777
- Array Functions: `http://www.opengis.net/spec/cql2/1.0/conf/array-functions`
7878
- Property-Property Comparisons: `http://www.opengis.net/spec/cql2/1.0/conf/property-property`
79-
- Accent and Case-insensitive Comparison: `http://www.opengis.net/spec/cql2/1.0/conf/accent-case-insensitive-comparison`
79+
- Functions: `http://www.opengis.net/spec/cql2/1.0/conf/functions`
80+
- Arithmetic Expressions: `http://www.opengis.net/spec/cql2/1.0/conf/arithmetic`
8081
- **Scope:** STAC API - Features, STAC API - Item Search
81-
- **[Extension Maturity Classification](https://github.com/radiantearth/stac-api-spec/tree/main/README.md#maturity-classification):** Pilot
82+
- **[Extension Maturity Classification](https://github.com/radiantearth/stac-api-spec/tree/main/README.md#maturity-classification):** Candidate
8283
- **Dependencies:**
8384
- [STAC API - Item Search](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0/item-search)
8485
- [STAC API - Features](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0/ogcapi-features)
@@ -87,33 +88,27 @@
8788
The Filter extension provides an expressive mechanism for searching based on Item attributes.
8889

8990
This extension references behavior defined in the
90-
[OGC API - Features - Part 3: Filtering and the Common Query Language (CQL2)](https://github.com/opengeospatial/ogcapi-features/tree/master/extensions/filtering) and [Common Query Language (CQL2)
91-
](https://github.com/opengeospatial/ogcapi-features/blob/master/cql2/README.md)
92-
specifications. As of November 2021, these specifications are still in draft status, but rapidly converging on
93-
finalized behavior. Several behaviors have changed since the
94-
last published [draft](https://portal.ogc.org/files/96288), so this spec references the latest revision in the
95-
[OAFeat Part 3 spec's GitHub repo](https://github.com/opengeospatial/ogcapi-features/tree/master/extensions/cql)
96-
and [Common Query Language (CQL2)](https://github.com/opengeospatial/ogcapi-features/blob/master/cql2/README.md)).
97-
Implementers should proceed with implementation, but must be aware that minor changes may be made
98-
before these specs are final.
99-
100-
OAFeat Part 3 CQL2 formally defines the syntax of "CQL2" as both a text format (cql2-text) as an ABNF grammar
91+
[OGC API - Features - Part 3: Filtering Version 1.0](https://docs.ogc.org/is/19-079r2/19-079r2.html)
92+
and [Common Query Language (CQL2) Version 1.0.0](https://docs.ogc.org/is/21-065r2/21-065r2.html)
93+
specifications.
94+
95+
CQL2 formally defines syntax in both a text format (cql2-text) as an ABNF grammar
10196
(largely similar to the BNF grammar in the General Model for CQL) and a JSON format (cql2-json) as a JSON Schema and
10297
OpenAPI schema. Additionally, it defines a natural
10398
language description of the declarative semantics, which were never well-defined for the original CQL language.
10499
The CQL2 Text format has had long-standing use within
105-
geospatial software (e.g., GeoServer), is not expected to change before final.
106-
OGC CQL2 Text has been previously described in [OGC Filter Encoding](https://www.ogc.org/standards/filter) and
100+
geospatial software (e.g., GeoServer).
101+
CQL2 Text has been previously described in [OGC Filter Encoding](https://www.ogc.org/standards/filter) and
107102
[OGC Catalogue Services 3.0 - General Model](http://docs.opengeospatial.org/is/12-168r6/12-168r6.html#62)
108-
(including a BNF grammar in Annex B). The CQL2 JSON format is newly-defined and has changed significantly during
109-
the draft process, but is believed to be stable now.
103+
(including a BNF grammar in Annex B). The CQL2 JSON format is newly-defined.
110104

111-
It should be noted that the "CQL" referred to here is "CQL2" defined in OGC API - Features - Part 3. This is a related, but
105+
It should be noted that the "CQL" referred to here is CQL2 defined in the OGC
106+
[Common Query Language (CQL2)](https://docs.ogc.org/is/21-065r2/21-065r2.html) specification. This is a related, but
112107
different language to the "classic" OGC CQL defined in the General Model. Relatedly, CQL is **not**
113-
referencing or related two other "CQL" languages,
108+
referencing or related to other "CQL" languages, including
114109
the [SRU (Search/Retrieve via URL) Contextual Query Language](https://www.loc.gov/standards/sru/cql/index.html) (formerly
115-
known as Common Query Language) or the [Cassandra Query Language](https://cassandra.apache.org/doc/latest/cql/) used by the
116-
Cassandra database.
110+
known as Common Query Language), the [Cassandra Query Language](https://cassandra.apache.org/doc/latest/cql/) used by the
111+
Cassandra database, or the OASIS Contextual Query Language.
117112

118113
## Limitations of Item Search
119114

@@ -134,7 +129,7 @@ multiple spatial or temporal filters.
134129
## Filter Expressiveness
135130

136131
This extension expands the capabilities of Item Search and the OAFeat Items resource with
137-
[OAFeat Part 3 CQL2](https://portal.ogc.org/files/96288)
132+
[Common Query Language (CQL2)](https://docs.ogc.org/is/21-065r2/21-065r2.html)
138133
by providing an expressive query language to construct more complex filter predicates using operators that are similar to
139134
those provided by SQL. This extension also supports the Queryables mechanism that allows discovery of what Item fields can be used in
140135
predicates.
@@ -149,13 +144,14 @@ CQL2 enables more expressive queries than supported by STAC API Item Search. The
149144

150145
## Conformance Classes
151146

152-
OAFeat Part 3 CQL2 defines several conformance classes that allow implementers to create compositions of
153-
functionality that support whatever expressiveness they need. This allows implementers to incrementally support CQL
147+
The OAFeat Part 3 - Filter and CQL2 specifications define several conformance classes that allow implementers
148+
to create compositions of
149+
functionality that support whatever expressiveness they need. This allows implementers to incrementally support CQL2
154150
syntax, without needing to implement a large specification all at once. Some implementers choose not to incur the cost of
155151
implementing functionality they do not need or may not be able to implement functionality that is not supported by
156152
their underlying datastore, e.g., Elasticsearch does not support the spatial predicates required by the
157153
Spatial Functions conformance class, only the `S_INTERSECTS` function against geometries in the
158-
Basic Spatial Functions with additional Spatial Data Types class.
154+
Basic Spatial Functions with additional Spatial Literals class.
159155

160156
The STAC API Filter Extension reuses the definitions and conformance classes in OAFeat CQL,
161157
adding only the *Item Search Filter* conformance class
@@ -197,7 +193,7 @@ For additional capabilities, the following classes may be implemented:
197193
`lower` and `upper` functions.
198194
- Basic Spatial Functions (`http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-functions`) defines the intersects function (`S_INTERSECTS`)
199195
that accepts only a BBOX or Point parameter.
200-
- Basic Spatial Functions with additional Spatial Data Types
196+
- Basic Spatial Functions with additional Spatial Literals
201197
(`http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-functions-plus`) defines the
202198
intersects function (`S_INTERSECTS`)
203199
to accept any geometry data type, including Point, MultiPoint, LineString, MultiLineString,
@@ -214,7 +210,7 @@ For additional capabilities, the following classes may be implemented:
214210
functions that provide more expressivity with datetime types than the relative comparison
215211
operators
216212
in the Basic CQL2 class.
217-
- Custom Functions (`http://www.opengis.net/spec/cql2/1.0/conf/functions`) defines support
213+
- Functions (`http://www.opengis.net/spec/cql2/1.0/conf/functions`) defines support
218214
for function definition and usage.
219215
- Arithmetic Expressions: (`http://www.opengis.net/spec/cql2/1.0/conf/arithmetic`) defines
220216
support for arithmetic expressions.
@@ -244,7 +240,7 @@ implementing CQL2 Text. From there, other comparison operators can be implemente
244240
dynamic Queryables schema.
245241

246242
Formal definitions and grammars for CQL2 can be found in the
247-
[OAFeat CQL spec](https://github.com/opengeospatial/ogcapi-features/tree/master/cql2) includes
243+
[OAFeat CQL2 spec](https://github.com/opengeospatial/ogcapi-features/tree/master/cql2) includes
248244
a BNF grammar for CQL2 Text and both a JSON Schema and an OpenAPI specification for CQL2 JSON.
249245
The standalone files are:
250246

@@ -876,7 +872,7 @@ filter=S_INTERSECTS(geometry,POINT(-77.0824 38.7886))
876872

877873
### Example 8: Spatial Intersection
878874

879-
The Basic Spatial Functions with additional Spatial Data Types class extends
875+
The Basic Spatial Functions with additional Spatial Literals class extends
880876
the Basic Spatial Functions class by adding support for additional
881877
geometries to the `S_INTERSECTS` parameter. This has the same semantics as provided
882878
by the Item Search `intersects` parameter. The `cql2-text` format uses WKT geometries and the `cql2-json`

0 commit comments

Comments
 (0)