stac-api-extensions / collection-search

Collection Search for STAC APIs
Apache License 2.0
10 stars 2 forks source link

STAC API - Collection Search

A search endpoint provides the ability to query STAC Collections objects across collections. It retrieves a group of Collection objects that match the provided parameters and provides them as the GET /collections endpoint does.

The Collection Search endpoint by default doesn't provide any query parameters to filter and all additional behavior will be defined in Extensions. These extensions can be composed by an implementer to cover only the set of functionality the implementer requires.

This extension is based on OGC API - Common - Part 2: Geospatial Data and aligned to OGC API - Records - Part 1: Local Resource Catalogue and selectively implements a subset of their "requirements classes".

All functionality in OGC API - Records - Part 1: Local Resource Catalogue is only defined for the GET method (i.e. GET /collections). Note: STAC may add behavior for POST /collections in the future, but due to a potential conflict with the Transaction Extension, specific rules for content negotiation might be required.

Pagination

Pagination for collections works exactly as it defined for Collections in general. See Collection Pagination for details.

Query Parameters and Fields

Basics

A basic set of query parameters MUST be implemented. These are aligned with the corresponding parameters in STAC API - Features and OGC API - Records:

Extensions

Free text search

A basic free-text search parameter q based on OGC API - Records and the STAC API - Free Text Search Extension can be added.

The specific set of text fields of a Collection to which the parameter is applied is left to the discretion of the implementation, but a recommendation is to at least consider title, description and keywords.

The search works case-insensitive and spaces have no special meaning. Any of the search terms must be present in the set of text fields (OR operaror).

Filter (CQL)

The filter extension for CQL support can be implemented, too. See https://github.com/stac-api-extensions/filter for details. It works as it does for Items, except that the queryables link for Collection Search is located in the response of GET /collections (property links). The path/endpoint for Collection Search queryables can be freely chosen, but SHOULD NOT conflict with GET /queryables.

Query (STACQL)

The query extension for STACQL support can be implemented, too. It works as it does for Items. See https://github.com/stac-api-extensions/query for details.

Sorting

The sort extension can be implemented, too. It works as it does for Items. See https://github.com/stac-api-extensions/sort for details.

Fields

The fields extension can be implemented, too. It works as it does for Items. See https://github.com/stac-api-extensions/fields for details.