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

Return links and assets to lists #151

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
11 changes: 5 additions & 6 deletions json-spec/json-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ your feedback will be directly incorporated.
| id | string | Provider ID | Provider ID for the item |
| geometry | geojson | Geometry | Bounding Box + Footprint of the item in lat/long (EPSG 4326) |
| datetime | date and time | Date and Time | The searchable date/time of the assets, in UTC (Formatted in RFC 3339) |
| links | dictionary | Resource Links | Dictionary of link objects to resources and related URLs (self required), each with a unique key |
| assets | dictionary | Assets | Dict of asset objects that can be be download (at least one required, thumbnail strongly recommended), each with a unique key |
| links | list | Resource Links | List of link objects to resources and related URLs (self required), each with an optional, unique `id` attribute |
| assets | list | Assets | List of asset objects that can be be download (at least one required, thumbnail strongly recommended), with an optional, unique `id` attribute |
| provider | string | Provider (optional) | Provider name |
| license | string | Data License (optional) | Item's license name based on SPDX License List or following guidelines for non-SPDX licenses |

Expand Down Expand Up @@ -60,9 +60,8 @@ for this purpose keep in mind the STAC spec is primarily searching for data, so
a user to search for. STAC content profiles may further specify the meaning of the main `datetime` field, and many will also add
more datetime fields.

**links** are used primarily to represent relationships with other entities. The key of each object in `links` represents the
link 'type', a shorthand for the relationship described. In time different link types, along with the expected 'rel' values will
be enumerated - for now the `self` type is the only one specified. A `link` dictionary item requires an 'href' to provide
**links** are used primarily to represent relationships with other entities. In time different link types, along with the expected 'rel' values will
be enumerated - for now the `self` type is the only one specified. A `link` item requires an 'href' to provide
the actual link - relative and absolute links are both allowed. The actual
['rel' relation'](https://www.w3schools.com/tags/att_link_rel.asp) is specified with a 'rel' attribute in the object, and is
also required. Data providers are advised to be liberal with the links section, to describe things like the catalog an item
Expand All @@ -71,7 +70,7 @@ required, to represent the location that the `Item` can be found online. This is
that includes `Item` metadata, so that the downstream user can know where the data has come from. The `self` href field
*must* be an absolute url, not relative, to communicate the canonical location of the `Item`.

**assets** is an set of keyed objects that contain of links to data associated with the `Item` that can be downloaded. This should include the main asset, as well
**assets** is an set of objects that contain links to data associated with the `Item` that can be downloaded. This should include the main asset, as well
as any 'sidecar' files that are related and help a client make sense of the data. Examples of this include extended metadata (in XML,
JSON, etc), unusable data masks, satellite ephemeris data, etc. Some assets (like Landsat data) are represented by multiple files -
all should be linked to. It is generally recommended that different processing levels or formats are not exhaustively listed in an
Expand Down
22 changes: 14 additions & 8 deletions json-spec/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,24 @@
"provider": "http://www.cool-sat.com",
"license": "CC-BY-4.0"
},
"links": {
"self": { "rel": "self", "href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/CS3-20160503_132130_04.json"}
},
"assets": {
"analytic": {
"links": [
{
"rel": "self",
"href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/CS3-20160503_132130_04.json"
}
],
"assets": [
{
"id": "analytic",
"href": "relative-path/to/analytic.tif",
"name": "4-Band Analytic"
},
"thumbnail": {
},
{
"id": "thumbnail",
"href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/thumbnail.png",
"name": "Thumbnail"
}
}
]
}


Expand Down