Skip to content

Commit

Permalink
Revert to storage:refs
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Aug 12, 2024
1 parent 91969ba commit 1f7b7e2
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 14 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `storage:schemes`, `storage:ref` and Storage Scheme Object
- `storage:schemes`, `storage:refs` and Storage Scheme Object
- Support the storage extension in Links
- Support for the Alternate Assets Extension
- Support for other storage providers, including custom S3 hosts
Expand All @@ -29,7 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- The extension is a framework for storage providers, it doesn't strictly define the individual providers.
- The storage providers are grouped in `storage:schemes` and located in the Item Properties, Collections or Catalog metadata
- Assets and Links reference the storage schemes by key in `storage:ref`
- Assets and Links reference the storage schemes by key in `storage:refs`

### Removed

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ The fields in the table below can be used in these parts of STAC documents:
- [x] Links
- [x] [Alternate Assets Object](https://github.com/stac-extensions/alternate-assets?tab=readme-ov-file#alternate-asset-object)

| Field Name | Type | Description |
| ------------- | ------- | ----------- |
| `storage:ref` | string | A property that specifies which schemes in `storage:schemes` may be used to access an Asset or Link. Each value must be one of the keys defined in `storage:schemes`. |
| Field Name | Type | Description |
| -------------- | ------- | ----------- |
| `storage:refs` | string | A property that specifies which schemes in `storage:schemes` may be used to access an Asset or Link. Each value must be one of the keys defined in `storage:schemes`. |

### Storage Scheme Object

Expand Down
4 changes: 3 additions & 1 deletion examples/catalog-link.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
"href": "s3://mybucket/project/documentation.pdf",
"type": "application/pdf",
"rel": "about",
"storage:ref": "aws"
"storage:refs": [
"aws"
]
}
]
}
8 changes: 6 additions & 2 deletions examples/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"title": "STAC Items as GeoParquet",
"href": "s3://mybucket/project/items.parquet",
"type": "application/vnd.apache.parquet",
"storage:ref": "aws",
"storage:refs": [
"aws"
],
"auth:refs": [
"aws"
]
Expand All @@ -44,7 +46,9 @@
"href": "s3://mybucket/project/documentation.pdf",
"type": "application/pdf",
"rel": "about",
"storage:ref": "aws",
"storage:refs": [
"aws"
],
"auth:refs": [
"aws"
]
Expand Down
12 changes: 9 additions & 3 deletions examples/item-naip.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,22 @@
"CO_GEOTIFF_RGB": {
"href": "s3://naip-visualization/tx/2016/100cm/rgb/30097/m_3009743_sw_14_1_20160928.tif",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"storage:ref": "aws-std",
"storage:refs": [
"aws-std"
],
"alternate": {
"href": "s3://mybucket/tx/2016/100cm/rgb/30097/m_3009743_sw_14_1_20160928.tif",
"storage:ref": "minio"
"storage:refs": [
"minio"
]
}
},
"GEOTIFF_AZURE_RGBIR": {
"href": "https://naip-nsl.blob.core.windows.net/tx/2016/100cm/rgb/30097/m_3009743_sw_14_1_20160928.tif",
"type": "image/tiff; application=geotiff",
"storage:ref": "az-wus2-ar"
"storage:refs": [
"az-wus2-ar"
]
}
},
"links": [
Expand Down
9 changes: 6 additions & 3 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,12 @@
"refs_field": {
"type": "object",
"properties": {
"storage:ref": {
"type": "string",
"minLength": 1
"storage:refs": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
},
"patternProperties": {
Expand Down

0 comments on commit 1f7b7e2

Please sign in to comment.