Skip to content

Commit 6e30601

Browse files
author
Phil Varner
committed
update spatial function changes in CQL2
1 parent e836a3e commit 6e30601

File tree

4 files changed

+58
-37
lines changed

4 files changed

+58
-37
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased] - TBD
9+
10+
### Changed
11+
12+
- Added Basic Spatial Functions with additional Spatial Data Types definition, which defines
13+
a class that has only S_INTERSECTS over all geometry data types
14+
- Renamed Basic Spatial Operators to Basic Spatial Functions
15+
- Renamed Spatial Operators to Spatial Functions
16+
- Renamed Temporal Operators to Temporal Functions
17+
- Renamed Array Operators to Array Functions
18+
819
## [v1.0.0-rc.3] - 2023-10-18
920

1021
### Added

README.md

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
- [Example 6: Temporal Intersection](#example-6-temporal-intersection)
2929
- [Example 6: T\_INTERSECTS cql2-text (GET)](#example-6-t_intersects-cql2-text-get)
3030
- [Example 6: T\_INTERSECTS cql2-json (POST)](#example-6-t_intersects-cql2-json-post)
31-
- [Example 7: Spatial Intersection in Basic Spatial Operators](#example-7-spatial-intersection-in-basic-spatial-operators)
31+
- [Example 7: Spatial Intersection in Basic Spatial Functions](#example-7-spatial-intersection-in-basic-spatial-functions)
3232
- [Example 7: S\_INTERSECTS cql2-text (GET)](#example-7-s_intersects-cql2-text-get)
3333
- [Example 7: S\_INTERSECTS cql2-json (POST)](#example-7-s_intersects-cql2-json-post)
34-
- [Example 8: Spatial Intersection in Spatial Operators](#example-8-spatial-intersection-in-spatial-operators)
34+
- [Example 8: Spatial Intersection](#example-8-spatial-intersection)
3535
- [Example 8: S\_INTERSECTS cql2-text (GET)](#example-8-s_intersects-cql2-text-get)
3636
- [Example 8: S\_INTERSECTS cql2-json (POST)](#example-8-s_intersects-cql2-json-post)
3737
- [Example 9: Spatial Intersection Disjunction](#example-9-spatial-intersection-disjunction)
@@ -52,6 +52,9 @@
5252
- [Example 14: Using the ACCENTI Accent-insensitive Comparison Function](#example-14-using-the-accenti-accent-insensitive-comparison-function)
5353
- [Example 14: cql2-text (GET)](#example-14-cql2-text-get)
5454
- [Example 14: cql2-json (POST)](#example-14-cql2-json-post)
55+
- [Example 15: Using the IN List predicate](#example-15-using-the-in-list-predicate)
56+
- [Example 15: cql2-text (GET)](#example-15-cql2-text-get)
57+
- [Example 15: cql2-json (POST)](#example-15-cql2-json-post)
5558

5659
## Overview
5760

@@ -65,12 +68,13 @@
6568
- CQL2 JSON: `http://www.opengis.net/spec/cql2/1.0/conf/cql2-json`
6669
- Basic CQL2: `http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2`
6770
- Advanced Comparison Operators: `http://www.opengis.net/spec/cql2/1.0/conf/advanced-comparison-operators`
68-
- Basic Spatial Operators: `http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-operators`
69-
- Spatial Operators: `http://www.opengis.net/spec/cql2/1.0/conf/spatial-operators`
70-
- Temporal Operators: `http://www.opengis.net/spec/cql2/1.0/conf/temporal-operators`
71+
- 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`
73+
- Spatial Functions: `http://www.opengis.net/spec/cql2/1.0/conf/spatial-functions`
74+
- Temporal Functions: `http://www.opengis.net/spec/cql2/1.0/conf/temporal-functions`
7175
- Custom Functions: `http://www.opengis.net/spec/cql2/1.0/conf/functions`
7276
- Arithmetic Expressions: `http://www.opengis.net/spec/cql2/1.0/conf/arithmetic`
73-
- Array Operators: `http://www.opengis.net/spec/cql2/1.0/conf/array-operators`
77+
- Array Functions: `http://www.opengis.net/spec/cql2/1.0/conf/array-functions`
7478
- Property-Property Comparisons: `http://www.opengis.net/spec/cql2/1.0/conf/property-property`
7579
- Accent and Case-insensitive Comparison: `http://www.opengis.net/spec/cql2/1.0/conf/accent-case-insensitive-comparison`
7680
- **Scope:** STAC API - Features, STAC API - Item Search
@@ -147,10 +151,11 @@ CQL2 enables more expressive queries than supported by STAC API Item Search. The
147151

148152
OAFeat Part 3 CQL2 defines several conformance classes that allow implementers to create compositions of
149153
functionality that support whatever expressiveness they need. This allows implementers to incrementally support CQL
150-
syntax, without needing to implement a huge spec all at once. Some implementers choose not to incur the cost of
154+
syntax, without needing to implement a large specification all at once. Some implementers choose not to incur the cost of
151155
implementing functionality they do not need or may not be able to implement functionality that is not supported by
152156
their underlying datastore, e.g., Elasticsearch does not support the spatial predicates required by the
153-
Spatial Operators conformance class, only the `S_INTERSECTS` operator in the Basic Spatial Operators class.
157+
Spatial Functions conformance class, only the `S_INTERSECTS` function against geometries in the
158+
Basic Spatial Functions with additional Spatial Data Types class.
154159

155160
The STAC API Filter Extension reuses the definitions and conformance classes in OAFeat CQL,
156161
adding only the *Item Search Filter* conformance class
@@ -190,26 +195,31 @@ For additional capabilities, the following classes may be implemented:
190195
(`http://www.opengis.net/spec/cql2/1.0/conf/advanced-comparison-operators`) defines the `LIKE`,
191196
`BETWEEN`, and `IN` operators. **Note**: this conformance class no longer requires implementing the
192197
`lower` and `upper` functions.
193-
- Basic Spatial Operators (`http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-operators`) defines the intersects operator (`S_INTERSECTS`)
194-
that accepts only a BBOX or POINT parameter.
195-
- Spatial Operators
196-
(`http://www.opengis.net/spec/cql2/1.0/conf/spatial-operators`) defines a set of operators that
197-
are part of the Dimensionally Extended Nine-intersection Model (DE-9IM) relation operators
198-
(`S_CONTAINS`, `S_CROSSES`, `S_DISJOINT`, `S_EQUALS`, `S_INTERSECTS`, `S_OVERLAPS`, `S_TOUCHES`, and `S_WITHIN`),
199-
and additionally defines the intersects operator (`S_INTERSECTS`) to accept LINESTRING,
200-
POLYGON, MULTIPOINT, MULTILINESTRING, and MULTIPOLYGON,
201-
in addition to BBOX and POINT as supported in Basic Spatial Operators.
202-
- Temporal Operators
203-
(`http://www.opengis.net/spec/cql2/1.0/conf/temporal-operators`) defines several temporal
204-
operators that provide more expressivity with datetime types than the relative comparison
198+
- Basic Spatial Functions (`http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-functions`) defines the intersects function (`S_INTERSECTS`)
199+
that accepts only a BBOX or Point parameter.
200+
- Basic Spatial Functions with additional Spatial Data Types
201+
(`http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-functions-plus`) defines the
202+
intersects function (`S_INTERSECTS`)
203+
to accept any geometry data type, including Point, MultiPoint, LineString, MultiLineString,
204+
Polygon, MultiPolygon, or GeometryCollection, in addition to BBOX and POINT as supported in
205+
Basic Spatial Functions.
206+
- Spatial Functions
207+
(`http://www.opengis.net/spec/cql2/1.0/conf/spatial-functions`) defines a set of functions that
208+
are part of the Dimensionally Extended Nine-intersection Model (DE-9IM) relation functions
209+
(`S_CONTAINS`, `S_CROSSES`, `S_DISJOINT`, `S_EQUALS`, `S_INTERSECTS`, `S_OVERLAPS`,
210+
`S_TOUCHES`, and `S_WITHIN`) over both BBOX and geometry data types Point, MultiPoint,
211+
LineString, MultiLineString, Polygon, MultiPolygon, or GeometryCollection.
212+
- Temporal Functions
213+
(`http://www.opengis.net/spec/cql2/1.0/conf/temporal-functions`) defines several temporal
214+
functions that provide more expressivity with datetime types than the relative comparison
205215
operators
206216
in the Basic CQL2 class.
207217
- Custom Functions (`http://www.opengis.net/spec/cql2/1.0/conf/functions`) defines support
208218
for function definition and usage.
209219
- Arithmetic Expressions: (`http://www.opengis.net/spec/cql2/1.0/conf/arithmetic`) defines
210220
support for arithmetic expressions.
211-
- Array Operators: (`http://www.opengis.net/spec/cql2/1.0/conf/array-operators`)
212-
defines array operators (`A_EQUALS`, `A_CONTAINS`, `A_CONTAINED_BY`, and `A_OVERLAPS`).
221+
- Array Functions: (`http://www.opengis.net/spec/cql2/1.0/conf/array-functions`)
222+
defines array functions (`A_EQUALS`, `A_CONTAINS`, `A_CONTAINED_BY`, and `A_OVERLAPS`).
213223
- Property-Property Comparisons: (`http://www.opengis.net/spec/cql2/1.0/conf/property-property`)
214224
allows the use of queryables (e.g., properties) in both positions of a clause, not just in the
215225
first position. This allows predicates like `property1 = property2` be expressed, whereas the
@@ -404,9 +414,8 @@ at least these values:
404414
"http://www.opengis.net/spec/cql2/1.0/conf/cql2-text",
405415
"http://www.opengis.net/spec/cql2/1.0/conf/cql2-json",
406416
"http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2",
407-
"http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-operators",
417+
"http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-functions",
408418
"http://www.opengis.net/spec/cql2/1.0/conf/advanced-comparison-operators"
409-
410419
],
411420
"links": [
412421
{
@@ -810,7 +819,7 @@ filter=prop1 = prop2
810819

811820
This uses the same queryables as Example 3.
812821

813-
The only temporal operator required is `T_INTERSECTS`. This is effectively that the datetime or interval operands
822+
The only temporal function required is `T_INTERSECTS`. This is effectively that the datetime or interval operands
814823
have any overlap between them.
815824

816825
#### Example 6: T_INTERSECTS cql2-text (GET)
@@ -834,9 +843,9 @@ filter=T_INTERSECTS(datetime, INTERVAL('2020-11-11T00:00:00Z', '2020-11-12T00:00
834843
}
835844
```
836845

837-
### Example 7: Spatial Intersection in Basic Spatial Operators
846+
### Example 7: Spatial Intersection in Basic Spatial Functions
838847

839-
The only spatial operator that must be implemented for Basic Spatial Operators
848+
The only spatial function that must be implemented for Basic Spatial Functions
840849
is `S_INTERSECTS` supporting BBOX and POINT. This has the same semantics as provided
841850
by the Item Search `intersects` parameter. The `cql2-text` format uses WKT geometries and the `cql2-json`
842851
format uses GeoJSON geometries.
@@ -865,9 +874,10 @@ filter=S_INTERSECTS(geometry,POINT(-77.0824 38.7886))
865874
}
866875
```
867876

868-
### Example 8: Spatial Intersection in Spatial Operators
877+
### Example 8: Spatial Intersection
869878

870-
The Spatial Operators extends the Basic Spatial Operators by adding support for additional
879+
The Basic Spatial Functions with additional Spatial Data Types class extends
880+
the Basic Spatial Functions class by adding support for additional
871881
geometries to the `S_INTERSECTS` parameter. This has the same semantics as provided
872882
by the Item Search `intersects` parameter. The `cql2-text` format uses WKT geometries and the `cql2-json`
873883
format uses GeoJSON geometries.

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"@redocly/openapi-cli": "^1.0.0-beta.94",
1414
"@stoplight/spectral-cli": "^6.11.0",
15-
"gh-pages": "^6.0.0",
15+
"gh-pages": "^6.1.1",
1616
"redoc-cli": "^0.13.21",
1717
"remark-cli": "^12.0.0",
1818
"remark-lint": "^9.1.2",

0 commit comments

Comments
 (0)