Skip to content

Commit

Permalink
include parent and root rel types, even for same file
Browse files Browse the repository at this point in the history
  • Loading branch information
cholmes committed Apr 23, 2021
1 parent d42e3c1 commit 314cfa1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added

- Added `preview` relation type for interoperable thumbnails to best practices. ([#1090](https://github.com/radiantearth/stac-spec/issues/1090))
- Recommendation to include both `root` and `parent` relation types when they point at the same file.

### Changed

Expand Down
4 changes: 4 additions & 0 deletions best-practices.md
Expand Up @@ -641,6 +641,10 @@ a number of the common official relations that are used in production STAC imple
| next | Indicates that the link's context is a part of a series, and that the next in the series is the link target. Typically used in STAC by API's, to return smaller groups of Items or Catalogs/Collections. |
| preview | Refers to a resource that serves as a preview (see [RFC 6903, sec. 3](https://tools.ietf.org/html/rfc6903#section-3)), usually a lower resolution thumbnail. In STAC this would usually be the same URL as the [thumbnail](#thumbnail) asset, but adding it as a link in addition enables OGC API clients that can't read assets to make use of it. It also adds support for thumbnails to STAC Catalogs as they can't list assets. |

Being liberal with the `links` also means that it's ok to have repeated links with the same `rel`. For example the
`parent` and `root` relation types will point at the same file when the child is directly below the root, and it is
recommended to include both.

### Versioning for Catalogs

In the Item and Collection STAC JSON, versions and deprecation can be indicated with the
Expand Down
5 changes: 5 additions & 0 deletions examples/core-item.json
Expand Up @@ -65,6 +65,11 @@
"href": "./collection.json",
"type": "application/json"
},
{
"rel": "parent",
"href": "./collection.json",
"type": "application/json"
},
{
"rel": "alternate",
"type": "text/html",
Expand Down
5 changes: 5 additions & 0 deletions examples/extended-item.json
Expand Up @@ -93,6 +93,11 @@
"href": "./collection.json",
"type": "application/json"
},
{
"rel": "parent",
"href": "./collection.json",
"type": "application/json"
},
{
"rel": "alternate",
"type": "text/html",
Expand Down
5 changes: 5 additions & 0 deletions examples/simple-item.json
Expand Up @@ -51,6 +51,11 @@
"rel": "root",
"href": "./collection.json",
"type": "application/json"
},
{
"rel": "parent",
"href": "./collection.json",
"type": "application/json"
}
],
"assets": {
Expand Down

0 comments on commit 314cfa1

Please sign in to comment.