From daa9baa54a2793fd9c26f092de8de3deecb3db21 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 8 Aug 2024 10:16:04 +0200 Subject: [PATCH 1/6] Fix typos --- best-practices.md | 4 ++-- commons/common-metadata.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/best-practices.md b/best-practices.md index c09e52da..748ccb47 100644 --- a/best-practices.md +++ b/best-practices.md @@ -550,9 +550,9 @@ As such you can deduplicate those properties and list them in the asset directly It should be relatively simple to migrate from STAC 1.0 (i.e. `eo:bands` and/or `raster:bands`) to the new `bands` array. -Usually, you can simply merge the each object on a by-index basis. +Usually, you can simply merge each object on a by-index basis. Nevertheless, you should consider deduplicating properties with the same values across all bands to the Asset. -For some fields you need to add the extension prefix of the `eo` or `raster` extension to the property name. +For some fields, you need to add the extension prefix of the `eo` or `raster` extension to the property name. STAC 1.0 example: diff --git a/commons/common-metadata.md b/commons/common-metadata.md index 203a7ed0..84a9ca65 100644 --- a/commons/common-metadata.md +++ b/commons/common-metadata.md @@ -236,10 +236,10 @@ Please refer to the [Bands best practices](../best-practices.md#bands) for more > \[!NOTE] > This property is the successor of the `eo:bands` and `raster:bands` fields, which has been present in previous versions of these extensions. > The behavior is very similar and they can be migrated easily. -> Usually, you can simply merge the each object on a by-index basis. +> Usually, you can simply merge each object on a by-index basis. > Nevertheless, you should consider deduplicating properties with the same values across all bands to the asset level > (see the [best practices](../best-practices.md#multiple-bands)). -> For some fields you need to add the extension prefix of the `eo` or `raster` extension to the property name though. +> For some fields, you need to add the extension prefix of the `eo` or `raster` extension to the property name though. > See the [Band migration best practice](../best-practices.md#band-migration) for details. ### Band Object From 4016c79be3a91473f154debc08f79b65f647a015 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 8 Aug 2024 16:05:25 +0200 Subject: [PATCH 2/6] Fix JSON Schema for item_assets --- collection-spec/json-schema/collection.json | 62 +++++++++++---------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/collection-spec/json-schema/collection.json b/collection-spec/json-schema/collection.json index befb8489..0a510f28 100644 --- a/collection-spec/json-schema/collection.json +++ b/collection-spec/json-schema/collection.json @@ -132,40 +132,42 @@ "$ref": "../../item-spec/json-schema/item.json#/definitions/assets" }, "item_assets": { - "allOf": [ - { - "type": "object", - "minProperties": 2, - "properties": { - "href": { - "title": "Disallow href", - "not": {} - }, - "title": { - "title": "Asset title", - "type": "string" - }, - "description": { - "title": "Asset description", - "type": "string" - }, - "type": { - "title": "Asset type", - "type": "string" - }, - "roles": { - "title": "Asset roles", - "type": "array", - "items": { + "additionalProperties": { + "allOf": [ + { + "type": "object", + "minProperties": 2, + "properties": { + "href": { + "title": "Disallow href", + "not": {} + }, + "title": { + "title": "Asset title", + "type": "string" + }, + "description": { + "title": "Asset description", "type": "string" + }, + "type": { + "title": "Asset type", + "type": "string" + }, + "roles": { + "title": "Asset roles", + "type": "array", + "items": { + "type": "string" + } } } + }, + { + "$ref": "../../item-spec/json-schema/common.json" } - }, - { - "$ref": "../../item-spec/json-schema/common.json" - } - ] + ] + } }, "links": { "$ref": "../../item-spec/json-schema/item.json#/definitions/links" From 3942426da68dd817a4051c62636b3763bce29752 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 8 Aug 2024 16:09:35 +0200 Subject: [PATCH 3/6] Update release date --- CHANGELOG.md | 2 +- CITATION.cff | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf86c522..87135c47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -## [v1.1.0-beta.1] - 2024-08-08 +## [v1.1.0-beta.1] - 2024-08-09 ### Added diff --git a/CITATION.cff b/CITATION.cff index 92c0e1ea..0417ca7c 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -10,7 +10,7 @@ preferred-citation: abstract: "Making geospatial assets openly searchable and crawlable." version: 1.1.0-beta.1 year: 2024 - date-released: 2024-08-08 + date-released: 2024-08-09 license: Apache-2.0 url: https://stacspec.org repository: https://github.com/radiantearth/stac-spec From 5c4247556b0cc05f7cc43723f25629ce8bd80b42 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 8 Aug 2024 17:24:25 +0200 Subject: [PATCH 4/6] Fix indentation of schema --- item-spec/json-schema/bands.json | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/item-spec/json-schema/bands.json b/item-spec/json-schema/bands.json index 4440760a..bb059549 100644 --- a/item-spec/json-schema/bands.json +++ b/item-spec/json-schema/bands.json @@ -1,24 +1,24 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://schemas.stacspec.org/v1.1.0-beta.1/item-spec/json-schema/bands.json", - "title": "Bands Field", - "type": "object", - "properties": { - "bands": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "allOf": [ - { - "$ref": "common.json" - } - ] - } + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://schemas.stacspec.org/v1.1.0-beta.1/item-spec/json-schema/bands.json", + "title": "Bands Field", + "type": "object", + "properties": { + "bands": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "allOf": [ + { + "$ref": "common.json" + } + ] } } - } \ No newline at end of file + } +} \ No newline at end of file From 7e0aabe6b4b71f79ff8b41bba627e3fb0cfa7b8d Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 8 Aug 2024 17:25:05 +0200 Subject: [PATCH 5/6] Fix check that disallows bands in item properties when no asset has bands --- item-spec/json-schema/item.json | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/item-spec/json-schema/item.json b/item-spec/json-schema/item.json index 797c54cf..ca0b755b 100644 --- a/item-spec/json-schema/item.json +++ b/item-spec/json-schema/item.json @@ -172,6 +172,7 @@ { "$comment": "The if-then-else below checks whether the bands field is given in assets or not. If not, allows bands in properties (then), otherwise, disallows bands in properties (else).", "if": { + "$comment": "If there is no asset with bands...", "required": [ "assets" ], @@ -187,27 +188,20 @@ } }, "then": { + "$comment": "... then bands are not allowed in properties...", "properties": { "properties": { - "anyOf": [ - { - "$ref": "bands.json" - }, - { - "properties": { - "bands": false - } - } - ] + "properties": { + "bands": false + } } } }, "else": { + "$comment": "... otherwise bands are allowed in properties.", "properties": { "properties": { - "properties": { - "bands": false - } + "$ref": "bands.json" } } } From 6ce2722a9c60002b90cb905470f776382587431f Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 8 Aug 2024 17:30:44 +0200 Subject: [PATCH 6/6] Revert "Update release date" This reverts commit 3942426da68dd817a4051c62636b3763bce29752. --- CHANGELOG.md | 2 +- CITATION.cff | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87135c47..cf86c522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -## [v1.1.0-beta.1] - 2024-08-09 +## [v1.1.0-beta.1] - 2024-08-08 ### Added diff --git a/CITATION.cff b/CITATION.cff index 0417ca7c..92c0e1ea 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -10,7 +10,7 @@ preferred-citation: abstract: "Making geospatial assets openly searchable and crawlable." version: 1.1.0-beta.1 year: 2024 - date-released: 2024-08-09 + date-released: 2024-08-08 license: Apache-2.0 url: https://stacspec.org repository: https://github.com/radiantearth/stac-spec