Skip to content

Commit 56c488a

Browse files
committed
Add Collection Search
1 parent d0e1994 commit 56c488a

File tree

2 files changed

+39
-28
lines changed

2 files changed

+39
-28
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ 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
9+
10+
### Added
11+
12+
- Added Collection Search conformance class
13+
814
## [v1.0.0] - 2022-09-28
915

1016
### Changed

README.md

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- [`null` vs. empty vs. missing](#null-vs-empty-vs-missing)
77
- [Examples](#examples)
88
- [Default fields](#default-fields)
9-
- [Explicitly get a valid STAC Item](#explicitly-get-a-valid-stac-item)
9+
- [Explicitly get a valid STAC entity](#explicitly-get-a-valid-stac-entity)
1010
- [Exclude geometry](#exclude-geometry)
1111
- [Minimal subset](#minimal-subset)
1212
- [Exclude a nested field](#exclude-a-nested-field)
@@ -17,56 +17,61 @@
1717
- **OpenAPI specification:** [openapi.yaml](openapi.yaml)
1818
- **Conformance Classes:**
1919
- `STAC API - Item Search` binding: <https://api.stacspec.org/v1.0.0/item-search#fields>
20+
- `STAC API - Collections / Collection Search` binding: <https://api.stacspec.org/v1.0.0/collection-search#fields>
2021
- `STAC API - Features` binding: <https://api.stacspec.org/v1.0.0/ogcapi-features#fields>
21-
- **Scope:** STAC API - Features, STAC API - Item Search
22+
- **Scope:** STAC API - Features, STAC API - Item Search, STAC API - Collections
2223
- **[Extension Maturity Classification](https://github.com/radiantearth/stac-api-spec/tree/main/README.md#maturity-classification):** Candidate
2324
- **Dependencies:**
2425
- [STAC API - Item Search](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0/item-search)
25-
- [STAC API - Features](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0/ogcapi-features)
26+
- [STAC API - Collections](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0/ogcapi-features#stac-api---collections)
27+
- [STAC API - Features](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0/ogcapi-features#stac-api---features)
2628
- **Owner**: none
2729

28-
By default, STAC API endpoints that return Item objects return every field of those Items. However,
29-
Item objects can have hundreds of fields, or large
30-
geometries, and even smaller Item objects can add up when large numbers of them are in results. Frequently, not all
31-
fields in an Item are used, so this
30+
By default, STAC API endpoints that return Item and Collection objects return every field of those.
31+
However, Item objects can have hundreds of fields, or large geometries,
32+
Collection objects may have a large number of links,
33+
and even smaller Item or Collection objects can add up when large numbers of them are in results.
34+
Frequently, not all fields in an Item or Collection are used, so this
3235
specification provides a mechanism for clients to request that servers to explicitly include or exclude certain fields.
3336

34-
This behavior may be bound to either or both of
37+
This behavior may be bound to either or both of
3538
[STAC API - Item Search](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0/item-search) (`/search` endpoint) or
36-
[STAC API - Features](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0/ogcapi-features)
39+
[STAC API - Collections](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0/ogcapi-features#stac-api---collections) (`/collections` endpoint) or
40+
[STAC API - Features](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0/ogcapi-features#stac-api---features)
3741
(`/collections/{collectionId}/items` endpoint) by advertising the relevant conformance class.
3842

39-
When used in a POST request with `Content-Type: application/json`, this adds an attribute `fields` with
40-
an object value to the core JSON search request body. The `fields` object contains two attributes with string array
43+
When used in a POST request with `Content-Type: application/json`, this adds an attribute `fields` with
44+
an object value to the core JSON search request body. The `fields` object contains two attributes with string array
4145
values, `include` and `exclude`.
4246

43-
When used with GET, the semantics are the same, except the syntax is a single parameter `fields` with
44-
a comma-separated list of field names, where `exclude` values are those prefixed by a `-` and `include` values are
47+
When used with GET, the semantics are the same, except the syntax is a single parameter `fields` with
48+
a comma-separated list of field names, where `exclude` values are those prefixed by a `-` and `include` values are
4549
those with no prefix, e.g., `-geometry`, or `id,-geometry,properties`.
4650

47-
It is recommended that implementations provide exactly the `include` and `exclude` sets specified by the request,
48-
but this is not required. These values are only hints to the server as to the desires of the client, and not a
49-
contract about what the response will be. Implementations are still considered compliant if fields not specified as part of `include`
50-
are in the response or ones specified as part of `exclude` are. For example, implementations may choose to always
51-
include simple string fields like `id` and `type` regardless of the `exclude` specification. However, it is recommended
52-
that implementations honor excludes for fields with more complex and arbitrarily large values
53-
(e.g., `geometry`, `assets`). For example, some Item objects may have a geometry with a simple 5 point polygon, but these
51+
It is recommended that implementations provide exactly the `include` and `exclude` sets specified by the request,
52+
but this is not required. These values are only hints to the server as to the desires of the client, and not a
53+
contract about what the response will be. Implementations are still considered compliant if fields not specified as part of `include`
54+
are in the response or ones specified as part of `exclude` are. For example, implementations may choose to always
55+
include simple string fields like `id` and `type` regardless of the `exclude` specification. However, it is recommended
56+
that implementations honor excludes for fields with more complex and arbitrarily large values
57+
(e.g., `geometry`, `assets`). For example, some Item objects may have a geometry with a simple 5 point polygon, but these
5458
polygons can be very large when reprojected to EPSG:4326, as in the case of a highly-decimated sinusoidal polygons.
5559
Implementations are also not required to implement semantics for nested values whereby one can include an object, but
5660
exclude fields of that object, e.g., include `properties` but exclude `properties.datetime`.
5761

58-
No error must be returned if a specified field has no value for it in the catalog. For example, if the field
62+
No error must be returned if a specified field has no value for it in the catalog. For example, if the field
5963
"properties.eo:cloud_cover" is specified but there is no cloud cover value for an Item, a successful HTTP response
60-
must be returned and the Item entities will not contain that
61-
field.
64+
must be returned and the Item entities will not contain that
65+
field.
6266

6367
If no `fields` are specified, the response is **must** be a valid
64-
[ItemCollection](https://github.com/radiantearth/stac-spec/tree/v1.0.0/itemcollection/README.md). If a client excludes
65-
fields that are required in a STAC Item, the server may return an invalid STAC Item. For example, if `type`
66-
and `geometry` are excluded, the entity will not even be a valid GeoJSON Feature, or if `bbox` is excluded then the entity
68+
[ItemCollection](https://github.com/radiantearth/stac-spec/tree/v1.0.0/itemcollection/README.md) or
69+
or list of collections (according to the specification for `GET /collections`). If a client excludes
70+
fields that are required in a STAC Item or Collection, the server may return an invalid STAC Item or Collection. For example, if `type`
71+
and `geometry` are excluded, the entity will not even be a valid GeoJSON Feature, or if `bbox` is excluded then the entity
6772
will not be a valid STAC Item.
6873

69-
Implementations may return fields not specified, e.g., id, but must avoid anything other than a minimal entity
74+
Implementations may return fields not specified, e.g., id, but must avoid anything other than a minimal entity
7075
representation.
7176

7277
This specification does not yet require the implementation of an "-ables" endpoint (like CQL2 does for queryables)
@@ -212,7 +217,7 @@ JSON
212217
}
213218
```
214219

215-
### Explicitly get a valid STAC Item
220+
### Explicitly get a valid STAC entity
216221

217222
Because implementations may choose to always include other fields (e.g.,
218223
extension-specific fields such as

0 commit comments

Comments
 (0)