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

Add data store parameters and data ID to the assets in the STAC published by xcube server #1029

Merged
Merged
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
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
* The `xcube.core.store.DataDescriptor` class now supports specifying time ranges
using both `datetime.date` and `datetime.datetime` objects. Previously,
only `datetime.date` objects were supported.
* The xcube server STAC API has been adjusted so that the data store
parameters and data ID, which are needed to open the data referred to by a STAC item,
are now included with the item's `analytic` asset.
Furthermore, a second assert called `analytic_multires` will be published
referring to the multi-resolution data format levels (#1020).

## Changes in 1.6.0

Expand Down
78 changes: 77 additions & 1 deletion test/webapi/ows/stac/demo-collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/datasets/demo.zarr",
"xcube:data_store_id": "s3",
"xcube:data_store_params": {
"root": "datasets",
"storage_options": {
"anon": true,
"client_kwargs": {
"endpoint_url": "http://localhost:8080/s3"
}
}
},
"xcube:open_data_params": {
"data_id": "demo.zarr"
},
"xcube:analytic": {
"c2rcc_flags": {
"title": "c2rcc_flags data access",
Expand Down Expand Up @@ -50,6 +63,69 @@
}
}
},
"analytic_multires": {
"title": "demo multi-resolution data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo.levels",
"xcube:data_store_id": "s3",
"xcube:data_store_params": {
"root": "pyramids",
"storage_options": {
"anon": true,
"client_kwargs": {
"endpoint_url": "http://localhost:8080/s3"
}
}
},
"xcube:open_data_params": {
"data_id": "demo.levels"
},
"xcube:analytic_multires": {
"c2rcc_flags": {
"title": "c2rcc_flags data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo.levels/0.zarr/c2rcc_flags"
},
"conc_chl": {
"title": "conc_chl data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo.levels/0.zarr/conc_chl"
},
"conc_tsm": {
"title": "conc_tsm data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo.levels/0.zarr/conc_tsm"
},
"kd489": {
"title": "kd489 data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo.levels/0.zarr/kd489"
},
"quality_flags": {
"title": "quality_flags data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo.levels/0.zarr/quality_flags"
}
}
},
"visual": {
"title": "demo visualisation",
"roles": [
Expand Down Expand Up @@ -807,4 +883,4 @@
"datetime": null,
"start_datetime": "2017-01-16T10:09:21Z",
"end_datetime": "2017-01-30T10:46:33Z"
}
}
118 changes: 117 additions & 1 deletion test/webapi/ows/stac/stac-datacubes-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,19 @@
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/datasets/demo-1w.zarr",
"xcube:data_store_id": "s3",
"xcube:data_store_params": {
"root": "datasets",
"storage_options": {
"anon": true,
"client_kwargs": {
"endpoint_url": "http://localhost:8080/s3"
}
}
},
"xcube:open_data_params": {
"data_id": "demo-1w.zarr"
},
"xcube:analytic": {
"c2rcc_flags": {
"title": "c2rcc_flags data access",
Expand Down Expand Up @@ -1053,6 +1066,109 @@
}
}
},
"analytic_multires": {
"title": "demo-1w multi-resolution data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels",
"xcube:data_store_id": "s3",
"xcube:data_store_params": {
"root": "pyramids",
"storage_options": {
"anon": true,
"client_kwargs": {
"endpoint_url": "http://localhost:8080/s3"
}
}
},
"xcube:open_data_params": {
"data_id": "demo-1w.levels"
},
"xcube:analytic_multires": {
"c2rcc_flags": {
"title": "c2rcc_flags data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/c2rcc_flags"
},
"conc_chl": {
"title": "conc_chl data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/conc_chl"
},
"conc_tsm": {
"title": "conc_tsm data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/conc_tsm"
},
"kd489": {
"title": "kd489 data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/kd489"
},
"quality_flags": {
"title": "quality_flags data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/quality_flags"
},
"c2rcc_flags_stdev": {
"title": "c2rcc_flags_stdev data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/c2rcc_flags_stdev"
},
"conc_chl_stdev": {
"title": "conc_chl_stdev data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/conc_chl_stdev"
},
"conc_tsm_stdev": {
"title": "conc_tsm_stdev data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/conc_tsm_stdev"
},
"kd489_stdev": {
"title": "kd489_stdev data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/kd489_stdev"
},
"quality_flags_stdev": {
"title": "quality_flags_stdev data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/quality_flags_stdev"
}
}
},
"visual": {
"title": "demo-1w visualisation",
"roles": [
Expand Down Expand Up @@ -1152,4 +1268,4 @@
"href": "http://localhost:8080/tiles/demo-1w/c2rcc_flags/0/0/0?time=2017-01-22T00:00:00.000000000"
}
}
}
}
118 changes: 117 additions & 1 deletion test/webapi/ows/stac/stac-single-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,19 @@
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/datasets/demo-1w.zarr",
"xcube:data_store_id": "s3",
"xcube:data_store_params": {
"root": "datasets",
"storage_options": {
"anon": true,
"client_kwargs": {
"endpoint_url": "http://localhost:8080/s3"
}
}
},
"xcube:open_data_params": {
"data_id": "demo-1w.zarr"
},
"xcube:analytic": {
"c2rcc_flags": {
"title": "c2rcc_flags data access",
Expand Down Expand Up @@ -1053,6 +1066,109 @@
}
}
},
"analytic_multires": {
"title": "demo-1w multi-resolution data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels",
"xcube:data_store_id": "s3",
"xcube:data_store_params": {
"root": "pyramids",
"storage_options": {
"anon": true,
"client_kwargs": {
"endpoint_url": "http://localhost:8080/s3"
}
}
},
"xcube:open_data_params": {
"data_id": "demo-1w.levels"
},
"xcube:analytic_multires": {
"c2rcc_flags": {
"title": "c2rcc_flags data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/c2rcc_flags"
},
"conc_chl": {
"title": "conc_chl data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/conc_chl"
},
"conc_tsm": {
"title": "conc_tsm data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/conc_tsm"
},
"kd489": {
"title": "kd489 data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/kd489"
},
"quality_flags": {
"title": "quality_flags data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/quality_flags"
},
"c2rcc_flags_stdev": {
"title": "c2rcc_flags_stdev data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/c2rcc_flags_stdev"
},
"conc_chl_stdev": {
"title": "conc_chl_stdev data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/conc_chl_stdev"
},
"conc_tsm_stdev": {
"title": "conc_tsm_stdev data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/conc_tsm_stdev"
},
"kd489_stdev": {
"title": "kd489_stdev data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/kd489_stdev"
},
"quality_flags_stdev": {
"title": "quality_flags_stdev data access",
"roles": [
"data"
],
"type": "application/zarr",
"href": "http://localhost:8080/s3/pyramids/demo-1w.levels/0.zarr/quality_flags_stdev"
}
}
},
"visual": {
"title": "demo-1w visualisation",
"roles": [
Expand Down Expand Up @@ -1152,4 +1268,4 @@
"href": "http://localhost:8080/tiles/demo-1w/c2rcc_flags/0/0/0?time=2017-01-22T00:00:00.000000000"
}
}
}
}
Loading
Loading