Skip to content

Commit b6f1ef3

Browse files
authored
Merge pull request #279 from philvarner/pv/filter-extension-conformance-class-consistency
Pv/filter extension conformance class consistency
2 parents 5e86a63 + e99bfe7 commit b6f1ef3

File tree

6 files changed

+49
-38
lines changed

6 files changed

+49
-38
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
- Children conformance class now requires the /children endpoint includes all child catalogs or collections
2020
referenced via `child` link relations from the Landing Page
2121
- Specifications now use the term "must" instead of "shall". The semantics of these words are identical.
22+
- Conformance class for Item Search Filter is now
23+
`https://api.stacspec.org/v1.0.0-beta.5/item-search#filter`, whereas before it was incorrectly stated as
24+
`https://api.stacspec.org/v1.0.0-beta.5/item-search#filter:item-search-filter`
2225
### Deprecated
2326

2427
### Removed

extensions.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ are scoped against ogcapi-features*.
3030

3131
This is the list of all extensions that are contained in the stac-api-spec repository.
3232

33-
| Extension Name | Scope* | Description | Maturity |
34-
| --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
35-
| [Fields](item-search/README.md#fields-extension) | [Item Search](item-search/) request | Adds parameter to control which fields are returned in the response. | *Pilot* |
36-
| [Filter](item-search/README.md#filter-extension) | [Item Search](item-search/) and [STAC API - Features](ogcapi-features) `/items` requests | Adds parameter to search Item and Collection properties. | *Pilot* |
37-
| [Context](item-search/README.md#context-extension) | [Item Search](item-search/) response ([ItemCollection](fragments/itemcollection/README.md)) | Adds search related metadata (context) to ItemCollection. | *Proposal* |
38-
| [Sort](item-search/README.md#sort-extension) | [Item Search](item-search/) request | Adds Parameter to control sorting of returns results. | *Pilot* |
39-
| [Transaction](ogcapi-features/extensions/transaction/README.md) | [STAC API - Features](ogcapi-features) POST on `/items` endpoint, DELETE/PUT on `/items/{itemId}` endpoint | Adds PUT and DELETE endpoints for the creation, editing, and deleting of Item objects. | *Pilot* |
40-
| [Items and Collections API Version](ogcapi-features/extensions/version/README.md) | [STAC API - Features](ogcapi-features) on `/items` endpoint | Adds GET versions resource to Collection and Item endpoints and provides semantics for a versioning scheme for Collection and Item objects. | *Proposal* |
41-
| [Query](item-search/README.md#query-extension) | [Item Search](item-search/) request | Adds parameter to search Item and Collection properties. | *Pilot* |
33+
| Extension Name | Scope* | Description | Maturity |
34+
| --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
35+
| [Fields](item-search/README.md#fields-extension) | [Item Search](item-search/) request | Adds parameter to control which fields are returned in the response. | *Pilot* |
36+
| [Filter](item-search/README.md#filter-extension) | [Item Search](item-search/) and [STAC API - Features](ogcapi-features) `/items` requests | Adds parameter to search Item and Collection properties. | *Pilot* |
37+
| [Context](item-search/README.md#context-extension) | [Item Search](item-search/) response ([ItemCollection](fragments/itemcollection/README.md)) | Adds search related metadata (context) to ItemCollection. | *Proposal* |
38+
| [Sort](item-search/README.md#sort-extension) | [Item Search](item-search/) request | Adds Parameter to control sorting of returns results. | *Pilot* |
39+
| [Transaction](ogcapi-features/extensions/transaction/README.md) | [STAC API - Features](ogcapi-features) POST on `/items` endpoint, DELETE/PUT on `/items/{itemId}` endpoint | Adds PUT and DELETE endpoints for the creation, editing, and deleting of Item objects. | *Pilot* |
40+
| [Items and Collections API Version](ogcapi-features/extensions/version/README.md) | [STAC API - Features](ogcapi-features) on `/items` endpoint | Adds GET versions resource to Collection and Item endpoints and provides semantics for a versioning scheme for Collection and Item objects. | *Proposal* |
41+
| [Query](item-search/README.md#query-extension) | [Item Search](item-search/) request | Adds parameter to search Item and Collection properties. | *Pilot* |
4242

4343
### Conformance classes of extensions
4444

@@ -49,11 +49,12 @@ the service supports. This are listed at the top of each extension description,
4949
- <https://api.stacspec.org/v1.0.0-beta.5/item-search#fields-extension>
5050
- <https://api.stacspec.org/v1.0.0-beta.5/ogcapi-features#fields-extension>
5151
- [Filter](item-search/README.md#filter-extension)
52-
- <http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter-extension>
53-
- <http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2>
54-
- <https://api.stacspec.org/v1.0.0-beta.5/item-search#filter:item-search-filter>
52+
- <https://api.stacspec.org/v1.0.0-beta.5/item-search#filter>
53+
- <http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter>
54+
- <http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter>
5555
- <http://www.opengis.net/spec/cql2/1.0/conf/cql2-text>
5656
- <http://www.opengis.net/spec/cql2/1.0/conf/cql2-json>
57+
- <http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2>
5758
- <http://www.opengis.net/spec/cql2/1.0/conf/advanced-comparison-operators>
5859
- <http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-operators>
5960
- <http://www.opengis.net/spec/cql2/1.0/conf/spatial-operators>

fragments/filter/README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
- **OpenAPI specification:** [openapi.yaml](openapi.yaml)
44
- **Conformance Classes:**
5+
- Item Search Filter: <https://api.stacspec.org/v1.0.0-beta.5/item-search#filter>
56
- Filter: <http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter>
6-
- Item Search Filter: <https://api.stacspec.org/v1.0.0-beta.5/item-search#filter:item-search-filter>
7+
- Features Filter: <http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter>
78
- CQL2 Text: <http://www.opengis.net/spec/cql2/1.0/conf/cql2-text>
89
- CQL2 JSON: <http://www.opengis.net/spec/cql2/1.0/conf/cql2-json>
910
- Basic CQL2: <http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2>
@@ -142,12 +143,10 @@ implementing functionality they do not need or may not be able to implement func
142143
their underlying datastore, e.g., Elasticsearch does not support the spatial predicates required by the
143144
Spatial Operators conformance class, only the `S_INTERSECTS` operator in the Basic Spatial Operators class.
144145

145-
The precise decomposition of the OAFeat conformance classes is still a work in progress, but is being finalized
146-
rapidly (see [ogcapi-features/issues/579](https://github.com/opengeospatial/ogcapi-features/issues/579)).
147146
The STAC API Filter Extension reuses the definitions and conformance classes in OAFeat CQL,
148-
adding only the Item Search Filter conformance class
149-
(`https://api.stacspec.org/v1.0.0-beta.5/item-search#filter:item-search-filter`) to bind
150-
the CQL2 Filter behavior to the Item Search resource.
147+
adding only the *Item Search Filter* conformance class
148+
(`https://api.stacspec.org/v1.0.0-beta.5/item-search#filter`) to bind
149+
the Filter behavior to the Item Search endpoint.
151150

152151
The implementation **must** support these conformance classes:
153152

@@ -157,7 +156,7 @@ The implementation **must** support these conformance classes:
157156
the query language used for the `filter` parameter defined by Filter. This includes logical operators (`AND`, `OR`, `NOT`),
158157
comparison operators (`=`, `<>`, `<`, `<=`, `>`, `>=`), and `IS NULL`. The comparison operators are allowed against
159158
string, numeric, boolean, date, and datetime types.
160-
- Item Search Filter (`https://api.stacspec.org/v1.0.0-beta.5/item-search#filter:item-search-filter`) binds the Filter and
159+
- Item Search Filter (`https://api.stacspec.org/v1.0.0-beta.5/item-search#filter`) binds the Filter and
161160
Basic CQL2 conformance classes to apply to the Item Search endpoint (`/search`). This class is the correlate of the OAFeat CQL2 Features
162161
Filter class that binds Filter and Basic CQL2 to the Features resource (`/collections/{cid}/items`).
163162

@@ -171,7 +170,12 @@ If both are advertised as being supported, it is only required that both be supp
171170
only that CQL2 JSON be supported for POST JSON requests. It is recommended that clients use CQL2 Text in GET requests and
172171
CQL2 JSON in POST requests.
173172

174-
For additional capabilities, the following classes can be implemented:
173+
The implementation **may** support the OAFeat Part 3 *Features Filter* conformance classes:
174+
175+
- Features Filter (`http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter`) binds the Filter and
176+
CQL2 conformance classes to the Features resource(`/collections/{cid}/items`).
177+
178+
For additional capabilities, the following classes may be implemented:
175179
- Advanced Comparison Operators
176180
(`http://www.opengis.net/spec/cql2/1.0/conf/advanced-comparison-operators`) defines the `LIKE`,
177181
`BETWEEN`, and `IN` operators. **Note**: this conformance class no longer requires implementing the
@@ -366,11 +370,12 @@ at least these values:
366370
"http://api.stacspec.org/v1.0.0-beta.5/stac-search",
367371
"http://api.stacspec.org/v1.0.0-beta.5/stac-response",
368372

373+
"https://api.stacspec.org/v1.0.0-beta.5/item-search#filter"
369374
"http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter",
370375
"http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter",
371-
"http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2",
372376
"http://www.opengis.net/spec/cql2/1.0/conf/cql2-text",
373377
"http://www.opengis.net/spec/cql2/1.0/conf/cql2-json",
378+
"http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2",
374379
"http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-operators",
375380
"http://www.opengis.net/spec/cql2/1.0/conf/advanced-comparison-operators"
376381

fragments/filter/openapi.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ paths:
1919
get:
2020
description: Landing Page
2121
tags:
22-
- STAC API - Core
22+
- Core
2323
responses:
2424
'200':
2525
description: Landing Page
@@ -38,7 +38,7 @@ paths:
3838
precise definition of this can be found in the OGC API - Features - Part 3: Filtering and the
3939
Common Query Language (CQL) specification.
4040
tags:
41-
- STAC API - Filter Extension
41+
- Filter Extension
4242
# parameters:
4343
# todo: may have collections parameter in the future
4444
responses:
@@ -84,7 +84,7 @@ paths:
8484
required: true
8585
description: ID of Collection
8686
tags:
87-
- STAC API - Filter Extension
87+
- Filter Extension
8888
responses:
8989
'200':
9090
$ref: '#/components/responses/Queryables'
@@ -103,16 +103,16 @@ components:
103103
required: true
104104
schema:
105105
oneOf:
106-
- $ref: '#/components/schemas/filter-cql-json'
107-
- $ref: '#/components/schemas/filter-cql-text'
106+
- $ref: '#/components/schemas/filter-cql2-json'
107+
- $ref: '#/components/schemas/filter-cql2-text'
108108
filter-lang:
109109
name: filter-lang
110110
x-stac-api-fragment: filter
111111
in: query
112112
description: |-
113113
**Extension:** Filter
114114
115-
The CQL2 filter encoding that the 'filter' value uses. Must be one of 'cql-text' or 'cql-json'.
115+
The CQL2 filter encoding that the 'filter' value uses. Must be one of 'cql2-text' or 'cql2-json'.
116116
required: false
117117
schema:
118118
$ref: '#/components/schemas/filter-lang'
@@ -138,24 +138,24 @@ components:
138138
A filter for properties in Items.
139139
properties:
140140
filter:
141-
$ref: '#/components/schemas/filter-cql-json'
141+
$ref: '#/components/schemas/filter-cql2-json'
142142
filter-lang:
143143
$ref: '#/components/schemas/filter-lang'
144144
filter-crs:
145145
$ref: '#/components/schemas/filter-crs'
146-
filter-cql-text:
146+
filter-cql2-text:
147147
description: |
148-
A CQL2 filter expression in the 'cql-text' encoding.
148+
A CQL2 filter expression in the 'cql2-text' encoding.
149149
type: string
150-
filter-cql-json:
150+
filter-cql2-json:
151151
$ref: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-features/master/cql2/standard/schema/cql2.yml#/components/schemas/booleanValueExpression'
152152
filter-lang:
153153
description: |
154154
The CQL2 filter encoding that the 'filter' value uses.
155155
type: string
156156
enum:
157-
- 'cql-text'
158-
- 'cql-json'
157+
- 'cql2-text'
158+
- 'cql2-json'
159159
filter-crs:
160160
description: |
161161
The coordinate reference system (CRS) used by spatial literals in the 'filter' value. The only value that STAC APIs must

item-search/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ The full description and examples of this are found in the [context fragment](..
343343
The STAC search endpoint, `/search`, by default only accepts a limited set of parameters to limit the results
344344
by properties. The Filter extension adds a new parameter, `filter`, that can take a number of comparison operators to
345345
match predicates between the fields requested and the values of Item objects. It can be used with both GET and POST and supports two
346-
query formats, `cql-text` and `cql-json`. The full details on the JSON structure are specified in the [filter
346+
query formats, `cql2-text` and `cql2-json`. The full details on the JSON structure are specified in the [filter
347347
fragment](../fragments/filter/).
348348

349349
### Query Extension

ogcapi-features/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,14 +393,16 @@ The full description and examples of this are found in the [context fragment](..
393393

394394
### Filter Extension
395395

396-
- **Conformance URI:** <https://api.stacspec.org/v1.0.0-beta.5/item-search#filter>
396+
- **Conformance URI:** <http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter>
397397
- **Extension [Maturity Classification](../README.md#maturity-classification):** Pilot
398398
- **Definition**: [STAC API - Filter Fragment](../fragments/filter/)
399399

400-
The STAC search endpoint, `/search`, by default only accepts a limited set of parameters to limit the results
400+
The Features items endpoint, `/collections/{collectionId}/items`, by default only accepts a few parameters to filter the results
401401
by properties. The Filter extension adds a new parameter, `filter`, that can take a number of comparison operators to
402-
match predicates between the fields requested and the values of Item objects. It can be used with both GET and POST and supports two
403-
query formats, `cql-text` and `cql-json`. The full details on the JSON structure are specified in the [filter
402+
match predicates between the fields requested and the values of Item objects. It can only be
403+
used with GET requests, as a POST to the items endpoint is a create operation in the
404+
Transaction Extension. It supports two
405+
query formats, `cql2-text` and `cql2-json`. The full details on the JSON structure are specified in the [filter
404406
fragment](../fragments/filter/).
405407

406408
### Query Extension

0 commit comments

Comments
 (0)