Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
These openers and writers are available to any file system data store,
e.g., `"file"`, `"s3"`.

* `xcube serve` now provides new metadata details of a multilevel dataset:
- The spatial unit of the dataset is now given by property `spatialUnits`
- The resolutions are now given by property `resolutions` and provide
the average x,y resolutions for each level of the dataset given in
the spatial units of the dataset's CRS.


### Other changes

* Added two new versions of the xcube logo, one for dark and one for light themes,
Expand Down
2 changes: 2 additions & 0 deletions test/webapi/datasets/test_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def test_dataset_with_details(self):
self.assertIsInstance(dataset.get("bbox"), (tuple, list))
self.assertIsInstance(dataset.get("geometry"), dict)
self.assertIsInstance(dataset.get("spatialRef"), str)
self.assertIsInstance(dataset.get("resolutions"), (tuple, list))
self.assertIsInstance(dataset.get("spatialUnits"), str)
self.assertNotIn("rgbSchema", dataset)
if dataset["id"] == "demo":
demo_dataset = dataset
Expand Down
2 changes: 2 additions & 0 deletions xcube/webapi/datasets/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ def get_dataset(
dataset_dict["bbox"] = list(ds_bbox)
dataset_dict["geometry"] = get_bbox_geometry(dataset_bounds, transformer)
dataset_dict["spatialRef"] = crs.to_string()
dataset_dict["resolutions"] = list(ml_ds.avg_resolutions)
dataset_dict["spatialUnits"] = ml_ds.grid_mapping.spatial_unit_name

variable_dicts = []
dim_names = set()
Expand Down
Loading