Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe ItemCollection and CollectionCollection #1290

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions collection-spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,10 @@ a collection and be able to adapt it to most any data model.

Implementors are encouraged to do what makes sense for them, and to check out the [examples](../examples/) and
[other implementations](https://stacindex.org/catalogs) for current best practices.

## Generic Collection of Collections

In some cases, a set of Collections must be grouped together in a unique file such as in the response
of the [collections search in a catalog](https://github.com/radiantearth/stac-api-spec/tree/release/v1.0.0/ogcapi-features#collections-collections).
When a set of Items must be grouped together in unique file, the [CollectionCollection](https://github.com/radiantearth/stac-api-spec/blob/604ade6158de15b8ab068320ca41e25e2bf0e116/ogcapi-features/openapi-collections.yaml#L121)
structure as defined in STAC API must be used.
Comment on lines +47 to +53
Copy link
Collaborator

@m-mohr m-mohr Jul 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd tone this down a bit:

Suggested change
## Generic Collection of Collections
In some cases, a set of Collections must be grouped together in a unique file such as in the response
of the [collections search in a catalog](https://github.com/radiantearth/stac-api-spec/tree/release/v1.0.0/ogcapi-features#collections-collections).
When a set of Items must be grouped together in unique file, the [CollectionCollection](https://github.com/radiantearth/stac-api-spec/blob/604ade6158de15b8ab068320ca41e25e2bf0e116/ogcapi-features/openapi-collections.yaml#L121)
structure as defined in STAC API must be used.
> \[!NOTE]
> In cases where a set of Collections is grouped together (e.g. for providing search results),
> the [CollectionCollection](https://github.com/radiantearth/stac-api-spec/blob/main/fragments/collectioncollection/README.md)
> object has been defined in the STAC API specification.

In was wondering whether we should create a fragment similar to the ItemCollection an link to that...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in STAC API spec?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Alongside the ItemCollection

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok will do the pr in api

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had some spare time, here's the PR radiantearth/stac-api-spec#448 @emmanuelmathot
Once merged we can update/add links to this PR.

11 changes: 11 additions & 0 deletions item-spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,14 @@ schemas validate additional fields defined in *[Common Metadata](common-metadata

**Common Metadata:** A set of commonly-used fields for STAC Items is listed in
*[common-metadata.md](common-metadata.md)*.

## Generic Collections of Items

In some cases, a set of Items must be grouped together in a unique file such as in the response
of a [collection search query](https://github.com/radiantearth/stac-api-spec/tree/release/v1.0.0/ogcapi-features#collection-items-collectionscollectioniditems).
When a set of Items must be grouped together in unique file, the [ItemCollection](https://github.com/radiantearth/stac-api-spec/blob/main/fragments/itemcollection/README.md)
object must be used.

Similarly to the relationship between a GeoJSON Feature and a STAC Item,
a STAC ItemCollection should be a valid GeoJSON [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)
to allow interoperability with existing tools that support GeoJSON.
emmanuelmathot marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion item-spec/item-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ that talks about common use cases of additional fields for assets.
## Media Type for STAC Item

A STAC Item is a GeoJSON file ([RFC 7946](https://tools.ietf.org/html/rfc7946)), and thus should use the
[`application/geo+json`](https://tools.ietf.org/html/rfc7946#section-12) as the [Media Type](https://en.wikipedia.org/wiki/Media_type)
[`application/geo+json`](https://tools.ietf.org/html/rfc7946#section-12) as the [Media Type](https://en.wikipedia.org/wiki/Media_type)
(previously known as the MIME Type).

## Extensions
Expand Down