Skip to content

Commit

Permalink
feat: Add new providers, lifecycle and lineage fields to linz ext (#69)
Browse files Browse the repository at this point in the history
* feat: Add new providers, lifecycle and lineage fields to linz and quality extensions

* feat: update examples and non-examples with new fields

* feat: update the description of nonconformant examples

* fix: alphabetize required list
  • Loading branch information
MitchellPaff authored Sep 28, 2021
1 parent 4a83d42 commit 29529b1
Show file tree
Hide file tree
Showing 19 changed files with 264 additions and 10 deletions.
25 changes: 19 additions & 6 deletions extensions/linz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,25 @@ extension which adds constraints to default STAC schema properties.

## Item Properties and Collection Fields

| Field Name | Type | Description |
| ---------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| title | string | **REQUIRED**. Collection title. |
| linz:security_classification | string | **REQUIRED**. New Zealand Government [Security Classification](https://www.digital.govt.nz/standards-and-guidance/governance/managing-online-channels/security-and-privacy-for-websites/foundations/classify-information/). Must be one of `Unclassified`, `IN-CONFIDENCE`, `SENSITIVE`, `RESTRICTED`, `CONFIDENTIAL`, `SECRET` or `TOP-SECRET`. |
| linz:created | string | **REQUIRED**. Creation date and time of the collection in UTC. |
| linz:updated | string | **REQUIRED**. Date and time the collection was updated last, in UTC. |
| Field Name | Type | Description |
| ---------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| title | string | **REQUIRED**. Collection title. |
| linz:created | string | **REQUIRED**. Creation date and time of the collection in UTC. |
| linz:lifecycle | string | **REQUIRED**. Lifecycle Status of Collection. Must be one of `Under Development`, `Preview`, `Ongoing`, `Completed`, `Deprecated`. |
| linz:providers | [Providers Object](#providers-object) | **REQUIRED**. A list of providers, which may include all organizations capturing or processing the data or the hosting provider. Providers should be listed in chronological order with the most recent provider being the last element of the list. |
| linz:security_classification | string | **REQUIRED**. New Zealand Government [Security Classification](https://www.digital.govt.nz/standards-and-guidance/governance/managing-online-channels/security-and-privacy-for-websites/foundations/classify-information/). Must be one of `Unclassified`, `IN-CONFIDENCE`, `SENSITIVE`, `RESTRICTED`, `CONFIDENTIAL`, `SECRET` or `TOP-SECRET`. |
| linz:updated | string | **REQUIRED**. Date and time the collection was updated last, in UTC. |

### Providers Object

This is the introduction for the purpose and the content of the XYZ Object...

| Field Name | Type | Description |
| ----------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name | string | **REQUIRED**. The name of the organization or the individual. |
| description | string | Multi-line description to add further provider information such as processing details for processors and producers, hosting details for hosts or basic contact information. CommonMark 0.29 syntax MAY be used for rich text representation. |
| roles | \[string] | Roles of the provider. Either `manager` or `custodian` |
| url | string | Homepage on which the provider describes the dataset and publishes contact information. |

### Extensions

Expand Down
12 changes: 11 additions & 1 deletion extensions/linz/examples/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,17 @@
"description": "A description",
"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 @@ -30,5 +39,6 @@
"quality:description": "Example quality description",
"quality:horizontal_accuracy": 1,
"quality:horizontal_accuracy_type": "Nominal",
"quality:lineage": "This is an example dataset lineage description.",
"version": "2.0.0"
}
1 change: 1 addition & 0 deletions extensions/linz/non-examples/additional_linz_property.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"quality:description": "Example quality description",
"quality:horizontal_accuracy": 1,
"quality:horizontal_accuracy_type": "Nominal",
"quality:lineage": "This is an example dataset lineage description.",
"version": "2.0.0",
"linz:unknown": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"quality:description": "Example quality description",
"quality:horizontal_accuracy": 1,
"quality:horizontal_accuracy_type": "Nominal",
"quality:lineage": "This is an example dataset lineage description.",
"version": "2.0.0",
"quality:invalid": true
}
43 changes: 43 additions & 0 deletions extensions/linz/non-examples/incorrect_providers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://linz.github.io/stac/_STAC_VERSION_/linz/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 a linz:providers object with no name field.",
"license": "Apache-2.0",
"linz:created": "2015-06-23T00:00:00Z",
"linz:lifecycle": "Under Development",
"linz:providers": [
{
"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]]
},
"temporal": {
"interval": [["2015-06-23T00:00:00Z", null]]
}
},
"summaries": {
"datetime": {
"minimum": "2015-06-23T00:00:00Z",
"maximum": "2019-07-10T13:44:56Z"
}
},
"links": [],
"quality:description": "Example quality description",
"quality:horizontal_accuracy": 1,
"quality:horizontal_accuracy_type": "Nominal",
"quality:lineage": "This is an example dataset lineage description.",
"version": "2.0.0"
}
43 changes: 43 additions & 0 deletions extensions/linz/non-examples/no_lifecycle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json",
"https://stac-extensions.github.io/version/v1.0.0/schema.json"
],
"type": "Collection",
"id": "collection",
"title": "This is a non-conformant example. It has no linz:lifecycle field.",
"description": "A description",
"license": "Apache-2.0",
"linz:created": "2015-06-23T00:00:00Z",
"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]]
},
"temporal": {
"interval": [["2015-06-23T00:00:00Z", null]]
}
},
"summaries": {
"datetime": {
"minimum": "2015-06-23T00:00:00Z",
"maximum": "2019-07-10T13:44:56Z"
}
},
"links": [],
"quality:description": "Example quality description",
"quality:horizontal_accuracy": 1,
"quality:horizontal_accuracy_type": "Nominal",
"quality:lineage": "This is an example dataset lineage description.",
"version": "2.0.0"
}
1 change: 1 addition & 0 deletions extensions/linz/non-examples/no_linz_created.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
"quality:description": "Example quality description",
"quality:horizontal_accuracy": 1,
"quality:horizontal_accuracy_type": "Nominal",
"quality:lineage": "This is an example dataset lineage description.",
"version": "2.0.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
"quality:description": "Example quality description",
"quality:horizontal_accuracy": 1,
"quality:horizontal_accuracy_type": "Nominal",
"quality:lineage": "This is an example dataset lineage description.",
"version": "2.0.0"
}
1 change: 1 addition & 0 deletions extensions/linz/non-examples/no_linz_updated.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
"quality:description": "Example quality description",
"quality:horizontal_accuracy": 1,
"quality:horizontal_accuracy_type": "Nominal",
"quality:lineage": "This is an example dataset lineage description.",
"version": "2.0.0"
}
36 changes: 36 additions & 0 deletions extensions/linz/non-examples/no_providers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json",
"https://stac-extensions.github.io/version/v1.0.0/schema.json"
],
"type": "Collection",
"id": "collection",
"title": "This is a non-conformant example. It has no linz:providers object.",
"description": "A description",
"license": "Apache-2.0",
"linz:created": "2015-06-23T00:00:00Z",
"linz:lifecycle": "Under Development",
"linz:security_classification": "Unclassified",
"linz:updated": "2015-06-23T00:00:00Z",
"extent": {
"spatial": {
"bbox": [[172.9, 1.3, 173, 1.4]]
},
"temporal": {
"interval": [["2015-06-23T00:00:00Z", null]]
}
},
"summaries": {
"datetime": {
"minimum": "2015-06-23T00:00:00Z",
"maximum": "2019-07-10T13:44:56Z"
}
},
"links": [],
"quality:description": "Example quality description",
"quality:horizontal_accuracy": 1,
"quality:horizontal_accuracy_type": "Nominal",
"quality:lineage": "This is an example dataset lineage description.",
"version": "2.0.0"
}
1 change: 1 addition & 0 deletions extensions/linz/non-examples/no_title.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
"quality:description": "Example quality description",
"quality:horizontal_accuracy": 1,
"quality:horizontal_accuracy_type": "Nominal",
"quality:lineage": "This is an example dataset lineage description.",
"version": "2.0.0"
}
3 changes: 2 additions & 1 deletion extensions/linz/non-examples/no_version_property.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
"links": [],
"quality:description": "Example quality description",
"quality:horizontal_accuracy": 1,
"quality:horizontal_accuracy_type": "Nominal"
"quality:horizontal_accuracy_type": "Nominal",
"quality:lineage": "This is an example dataset lineage description."
}
44 changes: 43 additions & 1 deletion extensions/linz/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@
"definitions": {
"linz": {
"type": "object",
"required": ["title", "linz:security_classification", "linz:created", "linz:updated"],
"required": [
"linz:created",
"linz:lifecycle",
"linz:providers",
"linz:security_classification",
"linz:updated",
"title"
],
"properties": {
"title": {
"type": "string",
Expand All @@ -36,6 +43,41 @@
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"linz:lifecycle": {
"title": "Life Cycle",
"type": "string",
"enum": ["Under Development", "Preview", "Ongoing", "Completed", "Deprecated"]
},
"linz:providers": {
"type": "array",
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"title": "Organization name",
"type": "string"
},
"description": {
"title": "Organization description",
"type": "string"
},
"roles": {
"title": "Organization roles",
"type": "array",
"items": {
"type": "string",
"enum": ["manager", "custodian"]
}
},
"url": {
"title": "Organization homepage",
"type": "string",
"format": "iri"
}
}
}
},
"linz:updated": {
"title": "Last Update Time",
"type": "string",
Expand Down
2 changes: 2 additions & 0 deletions extensions/quality/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@
| quality:horizontal_accuracy | number | The horizontal accuracy of the dataset. Must be in units of metres. |
| quality:horizontal_accuracy_type | string | The type of accuracy for the horizontal accuracy value. Options are "Nominal" and "95% confidence interval". |
| quality:vertical_accuracy | number | The vertical accuracy of the dataset. Must be in units of metres. |
| quality:lineage | string | **REQUIRED**. A descriptive statement about the lineage/history of a dataset |
| quality:vertical_accuracy | number | The vertical accuracy of the dataset. Must be in units of metres. |
| quality:vertical_accuracy_type | string | The type of accuracy for the vertical accuracy value. Options are "Nominal" and "95% confidence interval". |
5 changes: 4 additions & 1 deletion extensions/quality/examples/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
"z": 3
},
"template:another_one": [1, 2, 3],
"quality:description": "This is an example dataset quality description",
"quality:description": "This is an example dataset quality description.",
"quality:horizontal_accuracy": 0.4,
"quality:horizontal_accuracy_type": "Nominal",
"quality:lineage": "This is an example dataset lineage description.",
"quality:vertical_accuracy": 0.4,
"quality:vertical_accuracy_type": "Nominal",
"assets": {
"example": {
"href": "https://example.com/examples/file.xyz",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"quality:horizontal_accuracy": 0.4,
"quality:horizontal_accuracy_type": "Good",
"quality:lineage": "This is an example dataset lineage description.",
"assets": {
"example": {
"href": "https://example.com/examples/file.xyz"
Expand Down
1 change: 1 addition & 0 deletions extensions/quality/non-examples/incorrect_description.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"quality:description": 1234,
"quality:horizontal_accuracy": 0.4,
"quality:lineage": "This is an example dataset lineage description.",
"assets": {
"example": {
"href": "https://example.com/examples/file.xyz"
Expand Down
48 changes: 48 additions & 0 deletions extensions/quality/non-examples/missing_lineage_description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json",
"https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json"
],
"description": "This is a non-conformant STAC example using the quality extension. quality:lineage is missing.",
"type": "Collection",
"id": "collection",
"title": "A title",
"license": "Apache-2.0",
"extent": {
"spatial": {
"bbox": [[172.9, 1.3, 173, 1.4]]
},
"temporal": {
"interval": [["2015-06-23T00:00:00Z", null]]
}
},
"quality:description": "This is an example dataset description.",
"quality:horizontal_accuracy": 0.4,
"assets": {
"example": {
"href": "https://example.com/examples/file.xyz"
}
},
"item_assets": {
"data": {
"roles": ["data"]
}
},
"summaries": {
"datetime": {
"minimum": "2015-06-23T00:00:00Z",
"maximum": "2019-07-10T13:44:56Z"
}
},
"links": [
{
"href": "https://example.com/examples/collection.json",
"rel": "self"
},
{
"href": "https://example.com/examples/item.json",
"rel": "item"
}
]
}
5 changes: 5 additions & 0 deletions extensions/quality/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"definitions": {
"quality": {
"type": "object",
"required": ["quality:lineage"],
"properties": {
"quality:description": {
"title": "Dataset Data Quality",
Expand All @@ -27,6 +28,10 @@
"type": "string",
"enum": ["Nominal", "95% confidence interval"]
},
"quality:lineage": {
"title": "Lineage",
"type": "string"
},
"quality:vertical_accuracy": {
"title": "Vertical Accuracy",
"type": ["number"]
Expand Down

0 comments on commit 29529b1

Please sign in to comment.