Skip to content

Commit

Permalink
Avoid conflicts with the name from bands etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Jul 9, 2024
1 parent 7fece15 commit b915c6d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- **Title:** Alternate Assets
- **Identifier:** <https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json>
- **Field Name Prefix:** -
- **Field Name Prefix:** `alternate`
- **Scope:** Item, Collection
- **Extension [Maturity Classification](https://github.com/radiantearth/stac-spec/tree/master/extensions/README.md#extension-maturity):** Pilot
- **Owner**: @matthewhanson
Expand Down Expand Up @@ -30,10 +30,10 @@ The fields in the table below can be used in these parts of STAC documents:
- [x] Assets (for both Collections and Items, incl. Item Asset Definitions in Collections)
- [ ] Links

| Field Name | Type | Description |
| ---------- | -------------------------------------------------------------- | ----------- |
| alternate | Map<string, [Alternate Asset Object](#alternate-asset-object)> | An array of alternate location information for an asset |
| name | string | A short name to distinguish the asset from the alternate assets. |
| Field Name | Type | Description |
| -------------- | -------------------------------------------------------------- | ----------- |
| alternate | Map<string, [Alternate Asset Object](#alternate-asset-object)> | An array of alternate location information for an asset |
| alternate:name | string | A short name to distinguish the asset from the alternate assets. |

Each alternate asset consists of a key and an Alternate Asset Object.

Expand All @@ -55,14 +55,14 @@ In other words, if all the assets in an Item are all available via s3 direct acc

### Alternate Asset Object

The Alternate Asset Object are similar to the core Asset object, except only contain fields relevant to the location and access of the asset.
The Alternate Asset Object are similar to the core Asset object, except only contain fields relevant to the location and access of the asset.

| Field Name | Type | Description |
| ----------- | ------ | ----------- |
| href | string | **REQUIRED.** URI to the asset object. Relative and absolute URI are both allowed. |
| name | string | A short name to distinguish the alternate assets. |
| Field Name | Type | Description |
| -------------- | ------ | ----------- |
| href | string | **REQUIRED.** URI to the asset object. Relative and absolute URI are both allowed. |
| alternate:name | string | A short name to distinguish the alternate assets. |

In the simplest case, the object consists of a single `href` field, but could include additional details regarding the alternate location or URL.
In the simplest case, the object consists of a single `href` field, but could include additional details regarding the alternate location or URL.

Some fields that are commonly provided:

Expand Down
10 changes: 5 additions & 5 deletions examples/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
"roles": [
"archive"
],
"name": "Example Corp. HTTPS",
"alternate:name": "Example Corp. HTTPS",
"alternate": {
"s3": {
"href": "s3://mycoolsat-bucket/collection/items.zip",
"name": "Amazon S3"
"alternate:name": "Amazon S3"
},
"source": {
"href": "https://source.coop/example/collection/items.zip",
"name": "Source.coop HTTPS"
"alternate:name": "Source.coop HTTPS"
}
}
}
Expand All @@ -56,10 +56,10 @@
"roles": [
"data"
],
"name": "HTTPS",
"alternate:name": "HTTPS",
"alternate": {
"s3": {
"name": "S3",
"alternate:name": "S3",
"description": "Access the files via regular Amazon AWS S3 tooling."
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@
"roles": [
"data"
],
"name": "HTTPS",
"alternate:name": "HTTPS",
"alternate": {
"s3": {
"href": "s3://mycoolsat-bucket/examples/file.tif",
"name": "S3",
"alternate:name": "S3",
"description": "Access the files via regular Amazon AWS S3 tooling."
}
}
Expand Down
8 changes: 4 additions & 4 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"assets": {
"type": "object",
"properties": {
"name": {
"alternate:name": {
"$ref": "#/definitions/name"
},
"alternate": {
Expand All @@ -50,7 +50,7 @@
"type": "object",
"additionalProperties": {
"properties": {
"name": {
"alternate:name": {
"$ref": "#/definitions/name"
},
"alternate": {
Expand All @@ -70,7 +70,7 @@
"object_without_href": {
"type": "object",
"properties": {
"name": {
"alternate:name": {
"$ref": "#/definitions/name"
}
},
Expand All @@ -85,7 +85,7 @@
"additionalProperties": {
"type": "object",
"properties": {
"name": {
"alternate:name": {
"$ref": "#/definitions/name"
},
"alternate": {
Expand Down

0 comments on commit b915c6d

Please sign in to comment.