Skip to content

Commit

Permalink
Merge pull request #1101 from radiantearth/root-parent
Browse files Browse the repository at this point in the history
Best practice when root == parent clarification
  • Loading branch information
m-mohr authored Apr 28, 2021
2 parents d6062ff + 3e3677c commit a6f838a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,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 `href`. 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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 a6f838a

Please sign in to comment.