Skip to content

Commit

Permalink
fix: Include real projection extension fields (#87)
Browse files Browse the repository at this point in the history
* refactor: Sort extension URLs

* 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.

* refactor: Move invalid content to the bottom

* 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.
  • Loading branch information
l0b0 authored Oct 7, 2021
1 parent 3729952 commit 95322f8
Show file tree
Hide file tree
Showing 12 changed files with 157 additions and 24 deletions.
13 changes: 8 additions & 5 deletions extensions/linz/examples/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
}
}
}
21 changes: 18 additions & 3 deletions extensions/linz/non-examples/additional_linz_property.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -11,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]]
Expand All @@ -33,6 +43,11 @@
"quality:horizontal_accuracy_type": "Nominal",
"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
}
},
"linz:unknown": 1
}
21 changes: 18 additions & 3 deletions extensions/linz/non-examples/additional_quality_property.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -11,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]]
Expand All @@ -33,6 +43,11 @@
"quality:horizontal_accuracy_type": "Nominal",
"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
}
},
"quality:invalid": true
}
8 changes: 7 additions & 1 deletion extensions/linz/non-examples/incorrect_providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
}
}
8 changes: 7 additions & 1 deletion extensions/linz/non-examples/no_lifecycle.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
}
}
}
19 changes: 17 additions & 2 deletions extensions/linz/non-examples/no_linz_created.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,25 @@
"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 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]]
Expand All @@ -32,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
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -11,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": {
Expand All @@ -32,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
}
}
}
17 changes: 16 additions & 1 deletion extensions/linz/non-examples/no_linz_updated.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -11,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": {
Expand All @@ -32,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
}
}
}
8 changes: 7 additions & 1 deletion extensions/linz/non-examples/no_providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
}
}
}
19 changes: 17 additions & 2 deletions extensions/linz/non-examples/no_title.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,25 @@
"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",
"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]]
Expand All @@ -32,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
}
}
}
19 changes: 17 additions & 2 deletions extensions/linz/non-examples/no_version_property.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -11,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]]
Expand All @@ -32,5 +42,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
}
}
}

0 comments on commit 95322f8

Please sign in to comment.