From cc9cad551f1f7602649050bc47e3a80335bc48db Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Thu, 7 Oct 2021 11:56:55 +1300 Subject: [PATCH 1/4] refactor: Sort extension URLs --- extensions/linz/examples/collection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/linz/examples/collection.json b/extensions/linz/examples/collection.json index 8bd16c01..1841825b 100644 --- a/extensions/linz/examples/collection.json +++ b/extensions/linz/examples/collection.json @@ -3,8 +3,8 @@ "stac_extensions": [ "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json", "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json", - "https://stac-extensions.github.io/version/v1.0.0/schema.json", - "https://stac-extensions.github.io/projection/v1.0.0/schema.json" + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", + "https://stac-extensions.github.io/version/v1.0.0/schema.json" ], "type": "Collection", "id": "collection", From 4a749dda4d6d4f740a7e60dd0d42a14c2be650c5 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Thu, 7 Oct 2021 11:57:15 +1300 Subject: [PATCH 2/4] fix: Include real projection extension fields - The fields apply to assets, not the top level. - `proj:espg` should have been `proj:epsg`. - `proj:epsg` is not required. - The extension URL needs to be listed. --- extensions/linz/examples/collection.json | 9 ++++++--- .../linz/non-examples/additional_linz_property.json | 8 +++++++- .../non-examples/additional_quality_property.json | 8 +++++++- extensions/linz/non-examples/incorrect_providers.json | 8 +++++++- ...pg_code.json => invalid_projection_espg_code.json} | 11 +++++++++-- extensions/linz/non-examples/no_lifecycle.json | 8 +++++++- extensions/linz/non-examples/no_linz_created.json | 8 +++++++- .../non-examples/no_linz_security_classification.json | 8 +++++++- extensions/linz/non-examples/no_linz_updated.json | 8 +++++++- extensions/linz/non-examples/no_providers.json | 8 +++++++- extensions/linz/non-examples/no_title.json | 8 +++++++- extensions/linz/non-examples/no_version_property.json | 8 +++++++- 12 files changed, 85 insertions(+), 15 deletions(-) rename extensions/linz/non-examples/{no_projection_espg_code.json => invalid_projection_espg_code.json} (80%) diff --git a/extensions/linz/examples/collection.json b/extensions/linz/examples/collection.json index 1841825b..58d8ccaa 100644 --- a/extensions/linz/examples/collection.json +++ b/extensions/linz/examples/collection.json @@ -43,7 +43,10 @@ "quality:horizontal_accuracy_type": "Nominal", "quality:lineage": "This is an example dataset lineage description.", "version": "2.0.0", - "proj:epsg": 32659, - "proj:shape": [5558, 9559], - "proj:transform": [0.5, 0, 712710, 0, -0.5, 151406, 0, 0, 1] + "assets": { + "example": { + "href": "https://example.com/examples/file.xyz", + "proj:epsg": 32659 + } + } } diff --git a/extensions/linz/non-examples/additional_linz_property.json b/extensions/linz/non-examples/additional_linz_property.json index 822160d4..d8c32f8b 100644 --- a/extensions/linz/non-examples/additional_linz_property.json +++ b/extensions/linz/non-examples/additional_linz_property.json @@ -3,6 +3,7 @@ "stac_extensions": [ "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json", "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", "https://stac-extensions.github.io/version/v1.0.0/schema.json" ], "type": "Collection", @@ -34,5 +35,10 @@ "quality:lineage": "This is an example dataset lineage description.", "version": "2.0.0", "linz:unknown": 1, - "proj:espg": 4324 + "assets": { + "example": { + "href": "https://example.com/examples/file.xyz", + "proj:epsg": 32659 + } + } } diff --git a/extensions/linz/non-examples/additional_quality_property.json b/extensions/linz/non-examples/additional_quality_property.json index 0c2f0e3e..b04b0246 100644 --- a/extensions/linz/non-examples/additional_quality_property.json +++ b/extensions/linz/non-examples/additional_quality_property.json @@ -3,6 +3,7 @@ "stac_extensions": [ "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json", "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", "https://stac-extensions.github.io/version/v1.0.0/schema.json" ], "type": "Collection", @@ -34,5 +35,10 @@ "quality:lineage": "This is an example dataset lineage description.", "version": "2.0.0", "quality:invalid": true, - "proj:espg": 4324 + "assets": { + "example": { + "href": "https://example.com/examples/file.xyz", + "proj:epsg": 32659 + } + } } diff --git a/extensions/linz/non-examples/incorrect_providers.json b/extensions/linz/non-examples/incorrect_providers.json index eb9c7c0d..b41810bc 100644 --- a/extensions/linz/non-examples/incorrect_providers.json +++ b/extensions/linz/non-examples/incorrect_providers.json @@ -3,6 +3,7 @@ "stac_extensions": [ "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json", "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", "https://stac-extensions.github.io/version/v1.0.0/schema.json" ], "type": "Collection", @@ -41,5 +42,10 @@ "quality:horizontal_accuracy_type": "Nominal", "quality:lineage": "This is an example dataset lineage description.", "version": "2.0.0", - "proj:espg": 4324 + "assets": { + "example": { + "href": "https://example.com/examples/file.xyz", + "proj:epsg": 32659 + } + } } diff --git a/extensions/linz/non-examples/no_projection_espg_code.json b/extensions/linz/non-examples/invalid_projection_espg_code.json similarity index 80% rename from extensions/linz/non-examples/no_projection_espg_code.json rename to extensions/linz/non-examples/invalid_projection_espg_code.json index f6606cab..c4510b88 100644 --- a/extensions/linz/non-examples/no_projection_espg_code.json +++ b/extensions/linz/non-examples/invalid_projection_espg_code.json @@ -3,12 +3,13 @@ "stac_extensions": [ "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json", "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", "https://stac-extensions.github.io/version/v1.0.0/schema.json" ], "type": "Collection", "id": "collection", "title": "A title", - "description": "This is a non-conformant example. It has no proj:espg field.", + "description": "This is a non-conformant example. It has an invalid proj:epsg value.", "license": "Apache-2.0", "linz:created": "2015-06-23T00:00:00Z", "linz:lifecycle": "Under Development", @@ -41,5 +42,11 @@ "quality:horizontal_accuracy": 1, "quality:horizontal_accuracy_type": "Nominal", "quality:lineage": "This is an example dataset lineage description.", - "version": "2.0.0" + "version": "2.0.0", + "assets": { + "example": { + "href": "https://example.com/examples/file.xyz", + "proj:epsg": "32659" + } + } } diff --git a/extensions/linz/non-examples/no_lifecycle.json b/extensions/linz/non-examples/no_lifecycle.json index cc157c9d..46a81318 100644 --- a/extensions/linz/non-examples/no_lifecycle.json +++ b/extensions/linz/non-examples/no_lifecycle.json @@ -3,6 +3,7 @@ "stac_extensions": [ "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json", "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", "https://stac-extensions.github.io/version/v1.0.0/schema.json" ], "type": "Collection", @@ -41,5 +42,10 @@ "quality:horizontal_accuracy_type": "Nominal", "quality:lineage": "This is an example dataset lineage description.", "version": "2.0.0", - "proj:espg": 4324 + "assets": { + "example": { + "href": "https://example.com/examples/file.xyz", + "proj:epsg": 32659 + } + } } diff --git a/extensions/linz/non-examples/no_linz_created.json b/extensions/linz/non-examples/no_linz_created.json index fec6b80b..9c0dd58e 100644 --- a/extensions/linz/non-examples/no_linz_created.json +++ b/extensions/linz/non-examples/no_linz_created.json @@ -3,6 +3,7 @@ "stac_extensions": [ "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json", "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", "https://stac-extensions.github.io/version/v1.0.0/schema.json" ], "type": "Collection", @@ -32,5 +33,10 @@ "quality:horizontal_accuracy_type": "Nominal", "quality:lineage": "This is an example dataset lineage description.", "version": "2.0.0", - "proj:espg": 4324 + "assets": { + "example": { + "href": "https://example.com/examples/file.xyz", + "proj:epsg": 32659 + } + } } diff --git a/extensions/linz/non-examples/no_linz_security_classification.json b/extensions/linz/non-examples/no_linz_security_classification.json index c2836dc5..0de9a38f 100644 --- a/extensions/linz/non-examples/no_linz_security_classification.json +++ b/extensions/linz/non-examples/no_linz_security_classification.json @@ -3,6 +3,7 @@ "stac_extensions": [ "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json", "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", "https://stac-extensions.github.io/version/v1.0.0/schema.json" ], "type": "Collection", @@ -32,5 +33,10 @@ "quality:horizontal_accuracy_type": "Nominal", "quality:lineage": "This is an example dataset lineage description.", "version": "2.0.0", - "proj:espg": 4324 + "assets": { + "example": { + "href": "https://example.com/examples/file.xyz", + "proj:epsg": 32659 + } + } } diff --git a/extensions/linz/non-examples/no_linz_updated.json b/extensions/linz/non-examples/no_linz_updated.json index 615a1643..d85d1d93 100644 --- a/extensions/linz/non-examples/no_linz_updated.json +++ b/extensions/linz/non-examples/no_linz_updated.json @@ -3,6 +3,7 @@ "stac_extensions": [ "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json", "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", "https://stac-extensions.github.io/version/v1.0.0/schema.json" ], "type": "Collection", @@ -32,5 +33,10 @@ "quality:horizontal_accuracy_type": "Nominal", "quality:lineage": "This is an example dataset lineage description.", "version": "2.0.0", - "proj:espg": 4324 + "assets": { + "example": { + "href": "https://example.com/examples/file.xyz", + "proj:epsg": 32659 + } + } } diff --git a/extensions/linz/non-examples/no_providers.json b/extensions/linz/non-examples/no_providers.json index 8f2b10ec..5b07b28a 100644 --- a/extensions/linz/non-examples/no_providers.json +++ b/extensions/linz/non-examples/no_providers.json @@ -3,6 +3,7 @@ "stac_extensions": [ "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json", "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", "https://stac-extensions.github.io/version/v1.0.0/schema.json" ], "type": "Collection", @@ -34,5 +35,10 @@ "quality:horizontal_accuracy_type": "Nominal", "quality:lineage": "This is an example dataset lineage description.", "version": "2.0.0", - "proj:espg": 4324 + "assets": { + "example": { + "href": "https://example.com/examples/file.xyz", + "proj:epsg": 32659 + } + } } diff --git a/extensions/linz/non-examples/no_title.json b/extensions/linz/non-examples/no_title.json index 88027d0b..cdfd9a19 100644 --- a/extensions/linz/non-examples/no_title.json +++ b/extensions/linz/non-examples/no_title.json @@ -3,6 +3,7 @@ "stac_extensions": [ "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json", "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", "https://stac-extensions.github.io/version/v1.0.0/schema.json" ], "type": "Collection", @@ -32,5 +33,10 @@ "quality:horizontal_accuracy_type": "Nominal", "quality:lineage": "This is an example dataset lineage description.", "version": "2.0.0", - "proj:espg": 4324 + "assets": { + "example": { + "href": "https://example.com/examples/file.xyz", + "proj:epsg": 32659 + } + } } diff --git a/extensions/linz/non-examples/no_version_property.json b/extensions/linz/non-examples/no_version_property.json index aa1aa316..7d53a265 100644 --- a/extensions/linz/non-examples/no_version_property.json +++ b/extensions/linz/non-examples/no_version_property.json @@ -3,6 +3,7 @@ "stac_extensions": [ "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json", "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", "https://stac-extensions.github.io/version/v1.0.0/schema.json" ], "type": "Collection", @@ -32,5 +33,10 @@ "quality:horizontal_accuracy": 1, "quality:horizontal_accuracy_type": "Nominal", "quality:lineage": "This is an example dataset lineage description.", - "proj:espg": 4324 + "assets": { + "example": { + "href": "https://example.com/examples/file.xyz", + "proj:epsg": 32659 + } + } } From fe63e7d93bc52b8115d60dd89780990087ec9820 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Thu, 7 Oct 2021 12:09:02 +1300 Subject: [PATCH 3/4] refactor: Move invalid content to the bottom --- extensions/linz/non-examples/additional_linz_property.json | 4 ++-- extensions/linz/non-examples/additional_quality_property.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/linz/non-examples/additional_linz_property.json b/extensions/linz/non-examples/additional_linz_property.json index d8c32f8b..a1bd9732 100644 --- a/extensions/linz/non-examples/additional_linz_property.json +++ b/extensions/linz/non-examples/additional_linz_property.json @@ -34,11 +34,11 @@ "quality:horizontal_accuracy_type": "Nominal", "quality:lineage": "This is an example dataset lineage description.", "version": "2.0.0", - "linz:unknown": 1, "assets": { "example": { "href": "https://example.com/examples/file.xyz", "proj:epsg": 32659 } - } + }, + "linz:unknown": 1 } diff --git a/extensions/linz/non-examples/additional_quality_property.json b/extensions/linz/non-examples/additional_quality_property.json index b04b0246..7278e1d6 100644 --- a/extensions/linz/non-examples/additional_quality_property.json +++ b/extensions/linz/non-examples/additional_quality_property.json @@ -34,11 +34,11 @@ "quality:horizontal_accuracy_type": "Nominal", "quality:lineage": "This is an example dataset lineage description.", "version": "2.0.0", - "quality:invalid": true, "assets": { "example": { "href": "https://example.com/examples/file.xyz", "proj:epsg": 32659 } - } + }, + "quality:invalid": true } From 4fe1af866ea62b67de92dee72307520f2695d484 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Thu, 7 Oct 2021 12:12:42 +1300 Subject: [PATCH 4/4] refactor: Sync non-examples with example They should be as similar as possible to easily be able to work out the relevant difference, and to make sure it's easy to detect invalid tests. --- .../linz/non-examples/additional_linz_property.json | 11 ++++++++++- .../non-examples/additional_quality_property.json | 11 ++++++++++- extensions/linz/non-examples/no_linz_created.json | 11 ++++++++++- .../non-examples/no_linz_security_classification.json | 9 +++++++++ extensions/linz/non-examples/no_linz_updated.json | 9 +++++++++ extensions/linz/non-examples/no_title.json | 11 ++++++++++- extensions/linz/non-examples/no_version_property.json | 11 ++++++++++- 7 files changed, 68 insertions(+), 5 deletions(-) diff --git a/extensions/linz/non-examples/additional_linz_property.json b/extensions/linz/non-examples/additional_linz_property.json index a1bd9732..83cbcf1b 100644 --- a/extensions/linz/non-examples/additional_linz_property.json +++ b/extensions/linz/non-examples/additional_linz_property.json @@ -12,8 +12,17 @@ "description": "This is a non-conformant example. It has an extra \"linz:\" property.", "license": "Apache-2.0", "linz:created": "2015-06-23T00:00:00Z", - "linz:updated": "2015-06-23T00:00:00Z", + "linz:lifecycle": "Under Development", + "linz:providers": [ + { + "name": "Example", + "description": "Example description.", + "roles": ["custodian"], + "url": "https://www.exampleurl.com" + } + ], "linz:security_classification": "Unclassified", + "linz:updated": "2015-06-23T00:00:00Z", "extent": { "spatial": { "bbox": [[172.9, 1.3, 173, 1.4]] diff --git a/extensions/linz/non-examples/additional_quality_property.json b/extensions/linz/non-examples/additional_quality_property.json index 7278e1d6..0bc7c808 100644 --- a/extensions/linz/non-examples/additional_quality_property.json +++ b/extensions/linz/non-examples/additional_quality_property.json @@ -12,8 +12,17 @@ "description": "This is a non-conformant example. It has an extra \"quality:\" property.", "license": "Apache-2.0", "linz:created": "2015-06-23T00:00:00Z", - "linz:updated": "2015-06-23T00:00:00Z", + "linz:lifecycle": "Under Development", + "linz:providers": [ + { + "name": "Example", + "description": "Example description.", + "roles": ["custodian"], + "url": "https://www.exampleurl.com" + } + ], "linz:security_classification": "Unclassified", + "linz:updated": "2015-06-23T00:00:00Z", "extent": { "spatial": { "bbox": [[172.9, 1.3, 173, 1.4]] diff --git a/extensions/linz/non-examples/no_linz_created.json b/extensions/linz/non-examples/no_linz_created.json index 9c0dd58e..5e5a9b03 100644 --- a/extensions/linz/non-examples/no_linz_created.json +++ b/extensions/linz/non-examples/no_linz_created.json @@ -11,8 +11,17 @@ "title": "A title", "description": "This is a non-conformant example. It is missing the mandatory \"linz:created\" property.", "license": "Apache-2.0", - "linz:updated": "2015-06-23T00:00:00Z", + "linz:lifecycle": "Under Development", + "linz:providers": [ + { + "name": "Example", + "description": "Example description.", + "roles": ["custodian"], + "url": "https://www.exampleurl.com" + } + ], "linz:security_classification": "Unclassified", + "linz:updated": "2015-06-23T00:00:00Z", "extent": { "spatial": { "bbox": [[172.9, 1.3, 173, 1.4]] diff --git a/extensions/linz/non-examples/no_linz_security_classification.json b/extensions/linz/non-examples/no_linz_security_classification.json index 0de9a38f..d508dadd 100644 --- a/extensions/linz/non-examples/no_linz_security_classification.json +++ b/extensions/linz/non-examples/no_linz_security_classification.json @@ -12,6 +12,15 @@ "description": "This is a non-conformant example. It is missing the mandatory \"linz:security_classification\" property.", "license": "Apache-2.0", "linz:created": "2015-06-23T00:00:00Z", + "linz:lifecycle": "Under Development", + "linz:providers": [ + { + "name": "Example", + "description": "Example description.", + "roles": ["custodian"], + "url": "https://www.exampleurl.com" + } + ], "linz:updated": "2015-06-23T00:00:00Z", "extent": { "spatial": { diff --git a/extensions/linz/non-examples/no_linz_updated.json b/extensions/linz/non-examples/no_linz_updated.json index d85d1d93..74970382 100644 --- a/extensions/linz/non-examples/no_linz_updated.json +++ b/extensions/linz/non-examples/no_linz_updated.json @@ -12,6 +12,15 @@ "description": "This is a non-conformant example. It is missing the mandatory \"linz:updated\" property.", "license": "Apache-2.0", "linz:created": "2015-06-23T00:00:00Z", + "linz:lifecycle": "Under Development", + "linz:providers": [ + { + "name": "Example", + "description": "Example description.", + "roles": ["custodian"], + "url": "https://www.exampleurl.com" + } + ], "linz:security_classification": "Unclassified", "extent": { "spatial": { diff --git a/extensions/linz/non-examples/no_title.json b/extensions/linz/non-examples/no_title.json index cdfd9a19..ad510d45 100644 --- a/extensions/linz/non-examples/no_title.json +++ b/extensions/linz/non-examples/no_title.json @@ -11,8 +11,17 @@ "description": "This is a non-conformant example. It is missing the mandatory \"title\" property.", "license": "Apache-2.0", "linz:created": "2015-06-23T00:00:00Z", - "linz:updated": "2015-06-23T00:00:00Z", + "linz:lifecycle": "Under Development", + "linz:providers": [ + { + "name": "Example", + "description": "Example description.", + "roles": ["custodian"], + "url": "https://www.exampleurl.com" + } + ], "linz:security_classification": "Unclassified", + "linz:updated": "2015-06-23T00:00:00Z", "extent": { "spatial": { "bbox": [[172.9, 1.3, 173, 1.4]] diff --git a/extensions/linz/non-examples/no_version_property.json b/extensions/linz/non-examples/no_version_property.json index 7d53a265..a01c89f6 100644 --- a/extensions/linz/non-examples/no_version_property.json +++ b/extensions/linz/non-examples/no_version_property.json @@ -12,8 +12,17 @@ "description": "This is a non-conformant example. It is missing the mandatory \"version\" property.", "license": "Apache-2.0", "linz:created": "2015-06-23T00:00:00Z", - "linz:updated": "2015-06-23T00:00:00Z", + "linz:lifecycle": "Under Development", + "linz:providers": [ + { + "name": "Example", + "description": "Example description.", + "roles": ["custodian"], + "url": "https://www.exampleurl.com" + } + ], "linz:security_classification": "Unclassified", + "linz:updated": "2015-06-23T00:00:00Z", "extent": { "spatial": { "bbox": [[172.9, 1.3, 173, 1.4]]