From 21e0a71938669bc2c444fff3c39dc0d714012488 Mon Sep 17 00:00:00 2001 From: Emmanuel Mathot Date: Mon, 6 Feb 2023 15:57:30 +0100 Subject: [PATCH] fixed schemas and examples --- README.md | 6 +- examples/acquisition.json | 776 +++++++++++++++++----------------- examples/activation.json | 164 ++++--- examples/area.json | 158 ++++--- examples/call-collection.json | 452 ++++++++++---------- examples/collection.json | 73 ---- examples/item.json | 67 --- json-schema/schema.json | 209 +++++---- package.json | 6 +- 9 files changed, 895 insertions(+), 1016 deletions(-) delete mode 100644 examples/collection.json delete mode 100644 examples/item.json diff --git a/README.md b/README.md index 1bf9a7c..9af62a3 100644 --- a/README.md +++ b/README.md @@ -79,13 +79,14 @@ The fields in the table below can be used in these parts of STAC documents: | Field Name | Type | Description | | -------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------- | +| disaster:class | string | **REQUIRED**. Identifier of the object described in the item or collection | | disaster:call_ids | \[int] | Identifiers of the related [Call(s)](#call) | | disaster:activation_id | int | Identifier of the related [Activation](#activation) | | disaster:types | \[string] | Disaster Types (one of the [category](#disastertypes)) | -| disaster:class | string | Identifier of the object described in the item or collection | | disaster:country | string | Related Country identifier based on the ISO-3166 standard. In particular, the Alpha-3 representation. (e.g. BEL) | | disaster:regions | \[string] | Free text list identifying regions | | disaster:activation_status | string | Activation status. One of `open`, `closed`, `archived`. | +| disaster:resolution_class | string | For Class `acquisition`, One of `VLR`, `LR`, `MR`, `HR`, `VHR` | ### Additional Field Information @@ -117,10 +118,9 @@ The `disaster:class` is the commonly used category name to classify the object d Here is the list of suggested types: - `activation` : [Activation](#activation) -- `call`: [Call](#call) - `area` : [Area](#area) - `acquisition` : [Acquisition](#acquisition) -- `value_added_product` : [Value Added Product](#value-added-product) +- `vap` : [Value Added Product](#value-added-product) ## Relation types diff --git a/examples/acquisition.json b/examples/acquisition.json index 0caec1d..5ec40e1 100644 --- a/examples/acquisition.json +++ b/examples/acquisition.json @@ -1,408 +1,408 @@ { - "stac_version": "1.0.0", - "stac_extensions": [ - "https://stac-extensions.github.io/eo/v1.0.0/schema.json", - "https://stac-extensions.github.io/processing/v1.0.0/schema.json", - "https://stac-extensions.github.io/projection/v1.0.0/schema.json", - "https://stac-extensions.github.io/raster/v1.0.0/schema.json", - "https://stac-extensions.github.io/sat/v1.0.0/schema.json", - "https://stac-extensions.github.io/version/v1.0.0/schema.json", - "https://stac-extensions.github.io/view/v1.0.0/schema.json", - "https://terradue.github.io/disaster/v1.0.0/schema.json" - ], - "type": "Feature", - "id": "PT01S19_668124W174_3455752022011600000000MS00_GG003002001-calibrated", - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - -174.5324594838, - -19.5422657027 - ], - [ - -174.1591275458, - -19.5422657027 - ], - [ - -174.1591275458, - -19.7940509874 - ], - [ - -174.5324594838, - -19.7940509874 - ], - [ - -174.5324594838, - -19.5422657027 - ] - ] - ] - }, - "properties": { - "datetime": "2022-01-16T21:09:58Z", - "start_datetime": "2022-01-16T21:09:58Z", - "end_datetime": "2022-01-16T21:09:58Z", - "mission": "planetscope", - "platform": "planetscope", - "instruments": [ - "psb.sd" + "stac_version": "1.0.0", + "stac_extensions": [ + "https://stac-extensions.github.io/eo/v1.0.0/schema.json", + "https://stac-extensions.github.io/processing/v1.0.0/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", + "https://stac-extensions.github.io/raster/v1.0.0/schema.json", + "https://stac-extensions.github.io/sat/v1.0.0/schema.json", + "https://stac-extensions.github.io/version/v1.0.0/schema.json", + "https://stac-extensions.github.io/view/v1.0.0/schema.json", + "https://terradue.github.io/disaster/v1.0.0/schema.json" + ], + "type": "Feature", + "id": "PT01S19_668124W174_3455752022011600000000MS00_GG003002001-calibrated", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -174.5324594838, + -19.5422657027 ], - "sensor_type": "optical", - "gsd": 3.0, - "sat:orbit_state": "descending", - "sat:absolute_orbit": 5294818, - "view:sun_elevation": 53.59301, - "view:sun_azimuth": 98.66201, - "view:incidence_angle": 5.400846, - "view:off_nadir": 4.975902, - "proj:epsg": 32701, - "processing:level": "L2B", - "title": "PLANETSCOPE PSB.SD L3B 2022/01/16 21:09:58", - "disaster:class": "Acquisition", - "updated": "2022-01-18T22:45:52.2778052Z", - "created": "2022-01-18T22:24:15.216345Z", - "providers": [ - { - "name": "PLANET", - "roles": [ - "licensor" - ] - } + [ + -174.1591275458, + -19.5422657027 ], - "license": "proprietary", - "disaster:call_ids": [ - 855 + [ + -174.1591275458, + -19.7940509874 ], - "disaster:resolution_class": "HR", - "cpe:cos2_xml": null, - "cpe:cos2_id": "855-PLANET-PlanetScope-urn_ogc_def_EOP_PLANET_PT01S19_668124W174_3455752022011600000000MS00", - "description": "Name |Value\n---- |-----\nAgency | **PLANET** \nPlatform | **PLANETSCOPE** \nInstrument | **PSB.SD\nSource processing level | **L3B\nSensing Time | **2022/01/16 21:09:58\nService version | **0.6.52\nCreated | **2022/01/18 22:23:24\nUpdated | **2022/01/18 22:34:06\nCos2 Id | 855-PLANET-PlanetScope-urn_ogc_def_EOP_PLANET_PT01S19_668124W174_3455752022011600000000MS00\n", - "version": "4", - "processing:lineage": "Optical Calibration", - "processing:software": { - "opt-calibration-0_6_52": "1.0.0.0" - }, - "processing:facility": "Charter ADES", - }, - "bbox": [ - -174.5324594838, - -19.7940509874, - -174.1591275458, - -19.5422657027 + [ + -174.5324594838, + -19.7940509874 + ], + [ + -174.5324594838, + -19.5422657027 + ] + ] + ] + }, + "properties": { + "datetime": "2022-01-16T21:09:58Z", + "start_datetime": "2022-01-16T21:09:58Z", + "end_datetime": "2022-01-16T21:09:58Z", + "mission": "planetscope", + "platform": "planetscope", + "instruments": [ + "psb.sd" + ], + "sensor_type": "optical", + "gsd": 3, + "sat:orbit_state": "descending", + "sat:absolute_orbit": 5294818, + "view:sun_elevation": 53.59301, + "view:sun_azimuth": 98.66201, + "view:incidence_angle": 5.400846, + "view:off_nadir": 4.975902, + "proj:epsg": 32701, + "processing:level": "L2B", + "title": "PLANETSCOPE PSB.SD L3B 2022/01/16 21:09:58", + "disaster:class": "acquisition", + "updated": "2022-01-18T22:45:52.2778052Z", + "created": "2022-01-18T22:24:15.216345Z", + "providers": [ + { + "name": "PLANET", + "roles": [ + "licensor" + ] + } + ], + "license": "proprietary", + "disaster:call_ids": [ + 855 ], - "assets": { - "blue": { - "type": "image/tiff; application=geotiff", - "roles": [ - "data", - "reflectance" - ], - "href": "Optical_Calibration/r-blue.tif", - "eo:bands": [ - { - "name": "blue", - "description": "blue 485nm TOA", - "common_name": "blue", - "center_wavelength": 0.485, - "solar_illumination": 1997.46 - } - ], - "raster:bands": [ - { - "spatial_resolution": 3.0, - "statistics": { - "minimum": "0", - "maximum": "4633", - "mean": "723.99212068792", - "stddev": "559.49868731633", - "valid_percent": "100" - } - } - ], - "file:size": 104425594 + "disaster:resolution_class": "HR", + "cpe:cos2_xml": null, + "cpe:cos2_id": "855-PLANET-PlanetScope-urn_ogc_def_EOP_PLANET_PT01S19_668124W174_3455752022011600000000MS00", + "description": "Name |Value\n---- |-----\nAgency | **PLANET** \nPlatform | **PLANETSCOPE** \nInstrument | **PSB.SD\nSource processing level | **L3B\nSensing Time | **2022/01/16 21:09:58\nService version | **0.6.52\nCreated | **2022/01/18 22:23:24\nUpdated | **2022/01/18 22:34:06\nCos2 Id | 855-PLANET-PlanetScope-urn_ogc_def_EOP_PLANET_PT01S19_668124W174_3455752022011600000000MS00\n", + "version": "4", + "processing:lineage": "Optical Calibration", + "processing:software": { + "opt-calibration-0_6_52": "1.0.0.0" + }, + "processing:facility": "Charter ADES" + }, + "bbox": [ + -174.5324594838, + -19.7940509874, + -174.1591275458, + -19.5422657027 + ], + "assets": { + "blue": { + "type": "image/tiff; application=geotiff", + "roles": [ + "data", + "reflectance" + ], + "href": "Optical_Calibration/r-blue.tif", + "eo:bands": [ + { + "name": "blue", + "description": "blue 485nm TOA", + "common_name": "blue", + "center_wavelength": 0.485, + "solar_illumination": 1997.46 + } + ], + "raster:bands": [ + { + "spatial_resolution": 3, + "statistics": { + "minimum": 0, + "maximum": 4633, + "mean": 723.99212068792, + "stddev": 559.49868731633, + "valid_percent": 100 + } + } + ], + "file:size": 104425594 + }, + "red": { + "type": "image/tiff; application=geotiff", + "roles": [ + "data", + "reflectance" + ], + "href": "Optical_Calibration/r-red.tif", + "eo:bands": [ + { + "name": "red", + "description": "red 630nm TOA", + "common_name": "red", + "center_wavelength": 0.63, + "solar_illumination": 1631.38 + } + ], + "raster:bands": [ + { + "spatial_resolution": 3, + "statistics": { + "minimum": 0, + "maximum": 6562, + "mean": 296.96476291067, + "stddev": 322.91611947882, + "valid_percent": 100 + } + } + ], + "file:size": 101296200 + }, + "nir": { + "type": "image/tiff; application=geotiff", + "roles": [ + "data", + "reflectance" + ], + "href": "Optical_Calibration/r-nir.tif", + "eo:bands": [ + { + "name": "nir", + "description": "nir 820nm TOA", + "common_name": "nir", + "center_wavelength": 0.82, + "solar_illumination": 1066.31 + } + ], + "raster:bands": [ + { + "spatial_resolution": 3, + "statistics": { + "minimum": 0, + "maximum": 7120, + "mean": 228.99235208478, + "stddev": 380.46452984699, + "valid_percent": 100 + } + } + ], + "file:size": 122120289 + }, + "green": { + "type": "image/tiff; application=geotiff", + "roles": [ + "data", + "reflectance" + ], + "href": "Optical_Calibration/r-green.tif", + "eo:bands": [ + { + "name": "green", + "description": "green 545nm TOA", + "common_name": "green", + "center_wavelength": 0.545, + "solar_illumination": 1832.09 + } + ], + "raster:bands": [ + { + "spatial_resolution": 3, + "statistics": { + "minimum": 0, + "maximum": 5229, + "mean": 454.56339701689, + "stddev": 398.42656231882, + "valid_percent": 100 + } + } + ], + "file:size": 101195859 + }, + "overview-trc": { + "type": "image/tiff; application=geotiff", + "roles": [ + "composite", + "reflectance", + "visual" + ], + "href": "Optical_Calibration/overview-trc.tif", + "s_expressions": [ + "(interp v1 (asarray 0 10000) (asarray 0 1))", + "(interp v2 (asarray 0 10000) (asarray 0 1))", + "(interp v3 (asarray 0 10000) (asarray 0 1))", + "(where (> v3 0) 1 0)" + ], + "raster:bands": [ + { + "spatial_resolution": 3, + "statistics": { + "minimum": 0, + "maximum": 252, + "mean": 18.131946480458, + "stddev": 21.005990251111, + "valid_percent": 100 + } }, - "red": { - "type": "image/tiff; application=geotiff", - "roles": [ - "data", - "reflectance" - ], - "href": "Optical_Calibration/r-red.tif", - "eo:bands": [ - { - "name": "red", - "description": "red 630nm TOA", - "common_name": "red", - "center_wavelength": 0.63, - "solar_illumination": 1631.38 - } - ], - "raster:bands": [ - { - "spatial_resolution": 3.0, - "statistics": { - "minimum": "0", - "maximum": "6562", - "mean": "296.96476291067", - "stddev": "322.91611947882", - "valid_percent": "100" - } - } - ], - "file:size": 101296200 + { + "spatial_resolution": 3, + "statistics": { + "minimum": 0, + "maximum": 247, + "mean": 28.764749350778, + "stddev": 26.273450138387, + "valid_percent": 100 + } }, - "nir": { - "type": "image/tiff; application=geotiff", - "roles": [ - "data", - "reflectance" - ], - "href": "Optical_Calibration/r-nir.tif", - "eo:bands": [ - { - "name": "nir", - "description": "nir 820nm TOA", - "common_name": "nir", - "center_wavelength": 0.82, - "solar_illumination": 1066.31 - } - ], - "raster:bands": [ - { - "spatial_resolution": 3.0, - "statistics": { - "minimum": "0", - "maximum": "7120", - "mean": "228.99235208478", - "stddev": "380.46452984699", - "valid_percent": "100" - } - } - ], - "file:size": 122120289 + { + "spatial_resolution": 3, + "statistics": { + "minimum": 0, + "maximum": 242, + "mean": 49.442453181922, + "stddev": 38.264476846811, + "valid_percent": 100 + } }, - "green": { - "type": "image/tiff; application=geotiff", - "roles": [ - "data", - "reflectance" - ], - "href": "Optical_Calibration/r-green.tif", - "eo:bands": [ - { - "name": "green", - "description": "green 545nm TOA", - "common_name": "green", - "center_wavelength": 0.545, - "solar_illumination": 1832.09 - } - ], - "raster:bands": [ - { - "spatial_resolution": 3.0, - "statistics": { - "minimum": "0", - "maximum": "5229", - "mean": "454.56339701689", - "stddev": "398.42656231882", - "valid_percent": "100" - } - } - ], - "file:size": 101195859 + { + "spatial_resolution": 3, + "statistics": { + "minimum": 0, + "maximum": 255, + "mean": 167.93554409699, + "stddev": 120.91822349663, + "valid_percent": 100 + } + } + ], + "file:size": 90246661 + }, + "overview-civ": { + "type": "image/tiff; application=geotiff", + "roles": [ + "composite", + "reflectance", + "visual" + ], + "href": "Optical_Calibration/overview-civ.tif", + "s_expressions": [ + "(interp v1 (asarray 0 10000) (asarray 0 1))", + "(interp v2 (asarray 0 10000) (asarray 0 1))", + "(interp v3 (asarray 0 10000) (asarray 0 1))", + "(where (> v3 0) 1 0)" + ], + "raster:bands": [ + { + "spatial_resolution": 3, + "statistics": { + "minimum": 0, + "maximum": 253, + "mean": 14.436055494472, + "stddev": 25.952781507517, + "valid_percent": 100 + } }, - "overview-trc": { - "type": "image/tiff; application=geotiff", - "roles": [ - "composite", - "reflectance", - "visual" - ], - "href": "Optical_Calibration/overview-trc.tif", - "s_expressions": [ - "(interp v1 (asarray 0 10000) (asarray 0 1))", - "(interp v2 (asarray 0 10000) (asarray 0 1))", - "(interp v3 (asarray 0 10000) (asarray 0 1))", - "(where (> v3 0) 1 0)" - ], - "raster:bands": [ - { - "spatial_resolution": 3.0, - "statistics": { - "minimum": "0", - "maximum": "252", - "mean": "18.131946480458", - "stddev": "21.005990251111", - "valid_percent": "100" - } - }, - { - "spatial_resolution": 3.0, - "statistics": { - "minimum": "0", - "maximum": "247", - "mean": "28.764749350778", - "stddev": "26.273450138387", - "valid_percent": "100" - } - }, - { - "spatial_resolution": 3.0, - "statistics": { - "minimum": "0", - "maximum": "242", - "mean": "49.442453181922", - "stddev": "38.264476846811", - "valid_percent": "100" - } - }, - { - "spatial_resolution": 3.0, - "statistics": { - "minimum": "0", - "maximum": "255", - "mean": "167.93554409699", - "stddev": "120.91822349663", - "valid_percent": "100" - } - } - ], - "file:size": 90246661 + { + "spatial_resolution": 3, + "statistics": { + "minimum": 0, + "maximum": 252, + "mean": 18.131946480458, + "stddev": 21.005990251111, + "valid_percent": 100 + } }, - "overview-civ": { - "type": "image/tiff; application=geotiff", - "roles": [ - "composite", - "reflectance", - "visual" - ], - "href": "Optical_Calibration/overview-civ.tif", - "s_expressions": [ - "(interp v1 (asarray 0 10000) (asarray 0 1))", - "(interp v2 (asarray 0 10000) (asarray 0 1))", - "(interp v3 (asarray 0 10000) (asarray 0 1))", - "(where (> v3 0) 1 0)" - ], - "raster:bands": [ - { - "spatial_resolution": 3.0, - "statistics": { - "minimum": "0", - "maximum": "253", - "mean": "14.436055494472", - "stddev": "25.952781507517", - "valid_percent": "100" - } - }, - { - "spatial_resolution": 3.0, - "statistics": { - "minimum": "0", - "maximum": "252", - "mean": "18.131946480458", - "stddev": "21.005990251111", - "valid_percent": "100" - } - }, - { - "spatial_resolution": 3.0, - "statistics": { - "minimum": "0", - "maximum": "247", - "mean": "28.764749350778", - "stddev": "26.273450138387", - "valid_percent": "100" - } - }, - { - "spatial_resolution": 3.0, - "statistics": { - "minimum": "0", - "maximum": "255", - "mean": "167.93554409699", - "stddev": "120.91822349663", - "valid_percent": "100" - } - } - ], - "file:size": 99330809 + { + "spatial_resolution": 3, + "statistics": { + "minimum": 0, + "maximum": 247, + "mean": 28.764749350778, + "stddev": 26.273450138387, + "valid_percent": 100 + } }, - "overview-trc-low-res": { - "type": "image/tiff; application=geotiff", - "roles": [ - "composite", - "overview", - "reflectance" - ], - "href": "Optical_Calibration/overview-trc-low-res.tif", - "s_expressions": [ - "(interp v1 (asarray 0 10000) (asarray 0 1))", - "(interp v2 (asarray 0 10000) (asarray 0 1))", - "(interp v3 (asarray 0 10000) (asarray 0 1))", - "(where (> v3 0) 1 0)" - ], - "raster:bands": [ - { - "spatial_resolution": 38.4580078125, - "statistics": { - "minimum": "0", - "maximum": "252", - "mean": "18.133843421936", - "stddev": "21.002790055557", - "valid_percent": "100" - } - }, - { - "spatial_resolution": 38.4580078125, - "statistics": { - "minimum": "0", - "maximum": "247", - "mean": "28.765296936035", - "stddev": "26.268060132432", - "valid_percent": "100" - } - }, - { - "spatial_resolution": 38.4580078125, - "statistics": { - "minimum": "0", - "maximum": "241", - "mean": "49.445510864258", - "stddev": "38.265852749786", - "valid_percent": "100" - } - }, - { - "spatial_resolution": 38.4580078125, - "statistics": { - "minimum": "0", - "maximum": "255", - "mean": "167.94296264648", - "stddev": "120.91574245058", - "valid_percent": "100" - } - } - ], - "file:size": 4197763 + { + "spatial_resolution": 3, + "statistics": { + "minimum": 0, + "maximum": 255, + "mean": 167.93554409699, + "stddev": 120.91822349663, + "valid_percent": 100 + } } + ], + "file:size": 99330809 }, - "links": [ + "overview-trc-low-res": { + "type": "image/tiff; application=geotiff", + "roles": [ + "composite", + "overview", + "reflectance" + ], + "href": "Optical_Calibration/overview-trc-low-res.tif", + "s_expressions": [ + "(interp v1 (asarray 0 10000) (asarray 0 1))", + "(interp v2 (asarray 0 10000) (asarray 0 1))", + "(interp v3 (asarray 0 10000) (asarray 0 1))", + "(where (> v3 0) 1 0)" + ], + "raster:bands": [ { - "type": "application/geo+json", - "rel": "derived_from", - "title": "Source Dataset", - "href": "s3://cpe-production-catalog/calls/call-855/datasets/PT01S19_668124W174_3455752022011600000000MS00_GG003002001/PT01S19_668124W174_3455752022011600000000MS00_GG003002001.json" + "spatial_resolution": 38.4580078125, + "statistics": { + "minimum": 0, + "maximum": 252, + "mean": 18.133843421936, + "stddev": 21.002790055557, + "valid_percent": 100 + } }, { - "type": "application/geo+json", - "rel": "self", - "href": "PT01S19_668124W174_3455752022011600000000MS00_GG003002001-calibrated.json" + "spatial_resolution": 38.4580078125, + "statistics": { + "minimum": 0, + "maximum": 247, + "mean": 28.765296936035, + "stddev": 26.268060132432, + "valid_percent": 100 + } }, { - "type": "application/json", - "rel": "root", - "href": "s3://cpe-production-catalog/catalog.json" + "spatial_resolution": 38.4580078125, + "statistics": { + "minimum": 0, + "maximum": 241, + "mean": 49.445510864258, + "stddev": 38.265852749786, + "valid_percent": 100 + } + }, + { + "spatial_resolution": 38.4580078125, + "statistics": { + "minimum": 0, + "maximum": 255, + "mean": 167.94296264648, + "stddev": 120.91574245058, + "valid_percent": 100 + } } - ] + ], + "file:size": 4197763 + } + }, + "links": [ + { + "type": "application/geo+json", + "rel": "derived_from", + "title": "Source Dataset", + "href": "s3://cpe-production-catalog/calls/call-855/datasets/PT01S19_668124W174_3455752022011600000000MS00_GG003002001/PT01S19_668124W174_3455752022011600000000MS00_GG003002001.json" + }, + { + "type": "application/geo+json", + "rel": "self", + "href": "PT01S19_668124W174_3455752022011600000000MS00_GG003002001-calibrated.json" + }, + { + "type": "application/json", + "rel": "root", + "href": "s3://cpe-production-catalog/catalog.json" + } + ] } \ No newline at end of file diff --git a/examples/activation.json b/examples/activation.json index 76f6f99..76aa173 100644 --- a/examples/activation.json +++ b/examples/activation.json @@ -1,88 +1,86 @@ { - - "stac_version": "1.0.0", - "stac_extensions": [ - "https://stac-extensions.github.io/version/v1.0.0/schema.json", - "https://terradue.github.io/disaster/v1.0.0/schema.json" + "stac_version": "1.0.0", + "stac_extensions": [ + "https://stac-extensions.github.io/version/v1.0.0/schema.json", + "https://terradue.github.io/disaster/v1.0.0/schema.json" + ], + "type": "Feature", + "id": "act-744", + "geometry": { + "type": "Point", + "coordinates": [ + -174.79535482142856, + -20.4567 + ] + }, + "properties": { + "disaster:class": "activation", + "updated": "2022-01-21T14:17:02.2390396Z", + "title": "[Act-744/Call-855] Volcanic eruption in Tonga and the Pacific", + "disaster:activation_id": 744, + "disaster:call_ids": [ + 855 + ], + "disaster:types": [ + "other", + "volcano" + ], + "disaster:regions": [ + "Tonga" ], - "type": "Feature", - "id": "act-744", - "geometry": { - "type": "Point", - "coordinates": [ - -174.79535482142856, - -20.4567 - ] + "disaster:country": "TON", + "datetime": "2022-01-15T15:35:00Z", + "created": "2022-01-15T15:35:00Z", + "description": "![](\"https://store.terradue.com/api/cos2/various/icons/other.png\") \n\n## [Act-744/Call-855] Volcanic eruption in Tonga and the Pacific\n\n**15/01/2022 15:35:00**\n\n[Link on disasterscharter.org](https://disasterscharter.org/web/guest/activations/-/article/ocean-wave-in-tonga-activation-744-)\n\n \n\n An underwater volcano in the South Pacific erupted violently causing tsunamis to hit Hawaii, Japan, and Tonga's largest island, Tongatapu sending waves flooding into the capital.\n\n\n\n The Hunga-Tonga-Hunga-Ha'apai volcano, about 30 kilometers (18.6 miles) southeast of Tonga's Fonuafo'ou island, first erupted on Friday 14 Janurary and a second time on Saturday 15 January around 5:26 p.m. local time, according to media reports. The eruptions sent a plume of ash, gas and steam 20 kilometers (12.4 miles) into the air, \n\n\n\n Satellite imagery showed a massive ash cloud and shockwaves spreading from the eruption. Ash was falling from the sky in the Tonga capital, Nuku'alofa, Saturday evening and phone connections were down. The eruption was likely the biggest recorded anywhere on the planet in more than 30 years, according to experts.\n\n\n\n **Related News and Resources**\n\n\n\n* [View UNITAR webmap for the Tonga Volcanic eruption](https://experience.arcgis.com/experience/5be5d28e6fe740ae9ea8d940f6ef112b)\n\\t\n* [View EUMETSAT case study on the Hunga Tonga-Hunga Ha'apai eruption](https://www.eumetsat.int/hunga-tonga-hunga-haapai_2022)\n\\t\n* [View ICube-SERTIT pre and post event imagery of the Hunga Tonga-Hunga Ha'apai eruption](https://sertit.unistra.fr/en/news/volcanic-eruption-in-tonga/)\n\n", + "version": "28" + }, + "bbox": [ + -174.79535482142856, + -20.4567, + -174.79535482142856, + -20.4567 + ], + "assets": { + "icon": { + "type": "image/png", + "roles": [ + "thumbnail" + ], + "title": "placemark", + "href": "https://store.terradue.com/api/cos2/various/icons/other.png" }, - "properties": { - "disaster:class": "Activation", - "updated": "2022-01-21T14:17:02.2390396Z", - "title": "[Act-744/Call-855] Volcanic eruption in Tonga and the Pacific", - "disaster:activation_id": 744, - "disaster:call_ids": [ - 855 - ], - "disaster:type": [ - "Other", - "Volcano" - ], - "disaster:region": [ - "Tonga" - ], - "disaster:country": "TON", - "datetime": "2022-01-15T15:35:00Z", - "created": "2022-01-15T15:35:00Z", - "description": "![](\"https://store.terradue.com/api/cos2/various/icons/other.png\") \n\n## \[Act-744/Call-855\] Volcanic eruption in Tonga and the Pacific\n\n**15/01/2022 15:35:00**\n\n\[Link on disastercharter.org\](https://disasterscharter.org/web/guest/activations/-/article/ocean-wave-in-tonga-activation-744-)\n\n \n\n An underwater volcano in the South Pacific erupted violently causing tsunamis to hit Hawaii, Japan, and Tonga's largest island, Tongatapu sending waves flooding into the capital.\n\n\n\n The Hunga-Tonga-Hunga-Ha'apai volcano, about 30 kilometers (18.6 miles) southeast of Tonga's Fonuafo'ou island, first erupted on Friday 14 Janurary and a second time on Saturday 15 January around 5:26 p.m. local time, according to media reports. The eruptions sent a plume of ash, gas and steam 20 kilometers (12.4 miles) into the air, \n\n\n\n Satellite imagery showed a massive ash cloud and shockwaves spreading from the eruption. Ash was falling from the sky in the Tonga capital, Nuku'alofa, Saturday evening and phone connections were down. The eruption was likely the biggest recorded anywhere on the planet in more than 30 years, according to experts.\n\n\n\n **Related News and Resources**\n\n\n\n* \[View UNITAR webmap for the Tonga Volcanic eruption\](https://experience.arcgis.com/experience/5be5d28e6fe740ae9ea8d940f6ef112b)\n\\t\n* \[View EUMETSAT case study on the Hunga Tonga-Hunga Ha'apai eruption\](https://www.eumetsat.int/hunga-tonga-hunga-haapai\_2022)\n\\t\n* \[View ICube-SERTIT pre and post event imagery of the Hunga Tonga-Hunga Ha'apai eruption\](https://sertit.unistra.fr/en/news/volcanic-eruption-in-tonga/)\n\n", - "version": "28" + "area1": { + "type": "application/vnd.google-earth.kml+xml", + "roles": [ + "area", + "metadata" + ], + "title": "Area 1", + "href": "https://disasterscharter.org/cos-api/api/kml/cexp/855" + } + }, + "links": [ + { + "type": "text/html", + "rel": "about", + "title": "Disaster Charter Web Page", + "href": "https://disasterscharter.org/web/guest/activations/-/article/ocean-wave-in-tonga-activation-744-" }, - "bbox": [ - -174.79535482142856, - -20.4567, - -174.79535482142856, - -20.4567 - ], - "assets": { - "icon": { - "type": "image/png", - "roles": [ - "thumbnail" - ], - "title": "placemark", - "href": "https://store.terradue.com/api/cos2/various/icons/other.png" - }, - "area1": { - "type": "application/vnd.google-earth.kml+xml", - "roles": [ - "area", - "metadata" - ], - "title": "Area 1", - "href": "https://disasterscharter.org/cos-api/api/kml/cexp/855" - } + { + "type": "text/html", + "rel": "area", + "title": "AOI1", + "href": "area.json" }, - "links": [ - { - "type": "text/html", - "rel": "about", - "title": "Disaster Charter Web Page", - "href": "https://disasterscharter.org/web/guest/activations/-/article/ocean-wave-in-tonga-activation-744-" - }, - { - "type": "text/html", - "rel": "area", - "title": "AOI1", - "href": "area.json" - }, - { - "type": "application/geo+json", - "rel": "self", - "href": "s3://cpe-operations-catalog/activations/act-744/act-744.json" - }, - { - "type": "application/json", - "rel": "root", - "href": "s3://cpe-operations-catalog/catalog.json" - } - ] - -} + { + "type": "application/geo+json", + "rel": "self", + "href": "s3://cpe-operations-catalog/activations/act-744/act-744.json" + }, + { + "type": "application/json", + "rel": "root", + "href": "s3://cpe-operations-catalog/catalog.json" + } + ] +} \ No newline at end of file diff --git a/examples/area.json b/examples/area.json index b17e8b8..3f5a203 100644 --- a/examples/area.json +++ b/examples/area.json @@ -1,85 +1,83 @@ - { - - "stac_version": "1.0.0", - "stac_extensions": [ - "https://stac-extensions.github.io/version/v1.0.0/schema.json", - "https://terradue.github.io/disaster/v1.0.0/schema.json" - ], - "type": "Feature", - "id": "AOI1", - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - -175.0037, - -21.0535 - ], - [ - -175.3676, - -21.0484 - ], - [ - -175.3443, - -21.2597 - ], - [ - -175.0806, - -21.2814 - ], - [ - -175.0085, - -21.2872 - ], - [ - -175.0065, - -21.2245 - ], - [ - -175.0037, - -21.0535 - ] - ] - ] - }, - "properties": { - "disaster:class": "Area", - "description": "Call-855 AoI ID: 6, Priority: 1, SurfaceArea: 899, Comment: Tonga", - "title": "AOI1", - "disaster:activation_id": 744, - "disaster:call_ids": [ - 855 + "stac_version": "1.0.0", + "stac_extensions": [ + "https://stac-extensions.github.io/version/v1.0.0/schema.json", + "https://terradue.github.io/disaster/v1.0.0/schema.json" + ], + "type": "Feature", + "id": "AOI1", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -175.0037, + -21.0535 ], - "disaster:type": [ - "Other", - "Volcano" + [ + -175.3676, + -21.0484 ], - "disaster:region": [ - "Tonga" + [ + -175.3443, + -21.2597 ], - "disaster:country": "TON", - "updated": "2022-01-21T14:12:04.7671632Z", - "version": "7" - }, - "bbox": [ - -175.3676, - -21.2872, - -175.0037, - -21.0484 - ], - "assets": { }, - "links": [ - { - "type": "application/geo+json", - "rel": "self", - "href": "s3://cpe-operations-catalog/activations/act-744/areas/AOI1.json" - }, - { - "type": "application/json", - "rel": "root", - "href": "s3://cpe-operations-catalog/catalog.json" - } + [ + -175.0806, + -21.2814 + ], + [ + -175.0085, + -21.2872 + ], + [ + -175.0065, + -21.2245 + ], + [ + -175.0037, + -21.0535 + ] + ] ] - -} + }, + "properties": { + "disaster:class": "area", + "datetime": "2022-01-15T15:35:00Z", + "description": "Call-855 AoI ID: 6, Priority: 1, SurfaceArea: 899, Comment: Tonga", + "title": "AOI1", + "disaster:activation_id": 744, + "disaster:call_ids": [ + 855 + ], + "disaster:types": [ + "other", + "volcano" + ], + "disaster:regions": [ + "Tonga" + ], + "disaster:country": "TON", + "updated": "2022-01-21T14:12:04.7671632Z", + "version": "7" + }, + "bbox": [ + -175.3676, + -21.2872, + -175.0037, + -21.0484 + ], + "assets": {}, + "links": [ + { + "type": "application/geo+json", + "rel": "self", + "href": "s3://cpe-operations-catalog/activations/act-744/areas/AOI1.json" + }, + { + "type": "application/json", + "rel": "root", + "href": "s3://cpe-operations-catalog/catalog.json" + } + ] +} \ No newline at end of file diff --git a/examples/call-collection.json b/examples/call-collection.json index 8891879..c9c2772 100644 --- a/examples/call-collection.json +++ b/examples/call-collection.json @@ -1,229 +1,229 @@ { - - "id": "call-855-acquisitions-calibratedDataset", - "stac_version": "1.0.0", - "stac_extensions": [ - "https://stac-extensions.github.io/eo/v1.0.0/schema.json", - "https://stac-extensions.github.io/processing/v1.0.0/schema.json", - "https://stac-extensions.github.io/projection/v1.0.0/schema.json", - "https://stac-extensions.github.io/sar/v1.0.0/schema.json", - "https://stac-extensions.github.io/sat/v1.0.0/schema.json", - "https://stac-extensions.github.io/view/v1.0.0/schema.json", - "https://terradue.github.io/disaster/v1.0.0/schema.json" + "id": "call-855-acquisitions-calibratedDataset", + "stac_version": "1.0.0", + "stac_extensions": [ + "https://stac-extensions.github.io/eo/v1.0.0/schema.json", + "https://stac-extensions.github.io/processing/v1.1.0/schema.json", + "https://stac-extensions.github.io/projection/v1.0.0/schema.json", + "https://stac-extensions.github.io/sar/v1.0.0/schema.json", + "https://stac-extensions.github.io/sat/v1.0.0/schema.json", + "https://stac-extensions.github.io/view/v1.0.0/schema.json", + "https://terradue.github.io/disaster/v1.0.0/schema.json" + ], + "links": [], + "type": "Collection", + "summaries": { + "platform": [ + "sentinel-2a", + "saocom-1a", + "landsat-8", + "worldview-1", + "vision-1", + "planetscope", + "kanopus-v", + "kompsat-5", + "pleiades-1b", + "sentinel-2b", + "pleiades-1a", + "worldview-2", + "worldview-3", + "geoeye-1", + "gaofen-1", + "kompsat-3", + "sentinel-1a", + "tsx-1", + "vrss-2" ], - "links": [ + "constellation": [ + "sentinel-2", + "worldview-1", + "dmc", + "kanopus-v", + "pleiades", + "worldview-2", + "worldview-3", + "geoeye-1", + "gaofen-1", + "kompsat-3", + "sentinel-1", + "tsx-1" ], - "type": "Collection", - "summaries": { - "platform": [ - "sentinel-2a", - "saocom-1a", - "landsat-8", - "worldview-1", - "vision-1", - "planetscope", - "kanopus-v", - "kompsat-5", - "pleiades-1b", - "sentinel-2b", - "pleiades-1a", - "worldview-2", - "worldview-3", - "geoeye-1", - "gaofen-1", - "kompsat-3", - "sentinel-1a", - "tsx-1", - "vrss-2" - ], - "constellation": [ - "sentinel-2", - "worldview-1", - "dmc", - "kanopus-v", - "pleiades", - "worldview-2", - "worldview-3", - "geoeye-1", - "gaofen-1", - "kompsat-3", - "sentinel-1", - "tsx-1" - ], - "instruments": [ - "msi", - "sao1a", - "oli", - "tirs", - "pan", - "s-1", - "ps2", - "mss-pss", - "cosi", - "phr-1b", - "phr-1a", - "psb.sd", - "wfv2", - "wfv3", - "aeiss", - "c-sar", - "x-sar", - "sao1b", - "mss" - ], - "gsd": { - "minimum": 5.740367384E-06, - "maximum": 50.0 - }, - "sat:orbit_state": [ - "descending", - "ascending" - ], - "sat:absolute_orbit": { - "minimum": 69, - "maximum": 5294818 - }, - "sat:relative_orbit": { - "minimum": 17, - "maximum": 51821 - }, - "sat:platform_international_designator": [ - "2015-000A", - "2012-068A", - "2011-076F", - "2014-016A", - "2019-038D" - ], - "processing:level": [ - "L2B" - ], - "processing:lineage": [ - "Optical Calibration", - "SAR Calibration" - ], - "proj:epsg": [ - 32601, - 16101, - 32701 - ], - "processing:software": [ ], - "processing:facility": [ - "Charter ADES" - ], - "view:off_nadir": { - "minimum": 0.0, - "maximum": 45.53632736206055 - }, - "view:incidence_angle": { - "minimum": 0.0, - "maximum": 51.397804913561565 - }, - "sar:instrument_mode": [ - "SM", - "ST", - "IW", - "HS" - ], - "sar:frequency_band": [ - "L", - "X", - "C" - ], - "sar:polarizations": [ - "VV", - "VH", - "HH", - "HV" - ], - "sar:product_type": [ - "GTC", - "GRD", - "EEC", - "GEC" - ], - "sar:observation_direction": [ - "right", - "left" - ], - "sar:center_frequency": { - "minimum": 9.66, - "maximum": 9649999344.0 - }, - "sar:pixel_spacing_range": { - "minimum": 1.125, - "maximum": 9.08240921162708 - }, - "sar:pixel_spacing_azimuth": { - "minimum": 1.125, - "maximum": 9.1985491656046 - }, - "sar:looks_equivalent_number": { - "minimum": 1.0, - "maximum": 3.0 - }, - "sar:resolution_range": { - "minimum": 2.4180666359930525, - "maximum": 10.0 - }, - "sar:resolution_azimuth": { - "minimum": 2.446691180765021, - "maximum": 10.0 - }, - "eo:cloud_cover": { - "minimum": 0.0, - "maximum": 37.54 - }, - "view:sun_azimuth": { - "minimum": 33.11581450155, - "maximum": 348.4937 - }, - "view:sun_elevation": { - "minimum": 20.8557, - "maximum": 79.02138750971 - }, - "view:azimuth": { - "minimum": 8.26242661019, - "maximum": 334.102472217 - }, - "sar:looks_range": { - "minimum": 1.0, - "maximum": 1.0 - }, - "sar:looks_azimuth": { - "minimum": 1.0, - "maximum": 1.0 - }, - "sat:anx_datetime": { - "minimum": "2022-01-03T16:13:42.770448Z", - "maximum": "2022-01-27T16:13:41.834813Z" - } - }, - "extent": { - "spatial": { - "bbox": [ - [ - -177.757, - -22.7535, - 185.6569443994402, - -5.427413062105865 - ] - ] - }, - "temporal": { - "interval": [ - [ - "2011-03-22T06:03:51.979Z", - "2022-02-03T02:59:19.024Z" - ] - ] - } - }, - "keywords": [ "disaster", "call", "855" ], - "description": "Collection of Acquisitions as Calibrated datasets for call 855", - "license": "CC-BY-SA", - "disaster:class": "Acquisition", - "disaster:call_ids": [ - 855 - ] - -} + "instruments": [ + "msi", + "sao1a", + "oli", + "tirs", + "pan", + "s-1", + "ps2", + "mss-pss", + "cosi", + "phr-1b", + "phr-1a", + "psb.sd", + "wfv2", + "wfv3", + "aeiss", + "c-sar", + "x-sar", + "sao1b", + "mss" + ], + "gsd": { + "minimum": 0.000005740367384, + "maximum": 50 + }, + "sat:orbit_state": [ + "descending", + "ascending" + ], + "sat:absolute_orbit": { + "minimum": 69, + "maximum": 5294818 + }, + "sat:relative_orbit": { + "minimum": 17, + "maximum": 51821 + }, + "sat:platform_international_designator": [ + "2015-000A", + "2012-068A", + "2011-076F", + "2014-016A", + "2019-038D" + ], + "processing:level": [ + "L2B" + ], + "processing:lineage": [ + "Optical Calibration", + "SAR Calibration" + ], + "proj:epsg": [ + 32601, + 16101, + 32701 + ], + "processing:facility": [ + "Charter ADES" + ], + "view:off_nadir": { + "minimum": 0, + "maximum": 45.53632736206055 + }, + "view:incidence_angle": { + "minimum": 0, + "maximum": 51.397804913561565 + }, + "sar:instrument_mode": [ + "SM", + "ST", + "IW", + "HS" + ], + "sar:frequency_band": [ + "L", + "X", + "C" + ], + "sar:polarizations": [ + "VV", + "VH", + "HH", + "HV" + ], + "sar:product_type": [ + "GTC", + "GRD", + "EEC", + "GEC" + ], + "sar:observation_direction": [ + "right", + "left" + ], + "sar:center_frequency": { + "minimum": 9.66, + "maximum": 9649999344 + }, + "sar:pixel_spacing_range": { + "minimum": 1.125, + "maximum": 9.08240921162708 + }, + "sar:pixel_spacing_azimuth": { + "minimum": 1.125, + "maximum": 9.1985491656046 + }, + "sar:looks_equivalent_number": { + "minimum": 1, + "maximum": 3 + }, + "sar:resolution_range": { + "minimum": 2.4180666359930525, + "maximum": 10 + }, + "sar:resolution_azimuth": { + "minimum": 2.446691180765021, + "maximum": 10 + }, + "eo:cloud_cover": { + "minimum": 0, + "maximum": 37.54 + }, + "view:sun_azimuth": { + "minimum": 33.11581450155, + "maximum": 348.4937 + }, + "view:sun_elevation": { + "minimum": 20.8557, + "maximum": 79.02138750971 + }, + "view:azimuth": { + "minimum": 8.26242661019, + "maximum": 334.102472217 + }, + "sar:looks_range": { + "minimum": 1, + "maximum": 1 + }, + "sar:looks_azimuth": { + "minimum": 1, + "maximum": 1 + }, + "sat:anx_datetime": { + "minimum": "2022-01-03T16:13:42.770448Z", + "maximum": "2022-01-27T16:13:41.834813Z" + } + }, + "extent": { + "spatial": { + "bbox": [ + [ + -177.757, + -22.7535, + 185.6569443994402, + -5.427413062105865 + ] + ] + }, + "temporal": { + "interval": [ + [ + "2011-03-22T06:03:51.979Z", + "2022-02-03T02:59:19.024Z" + ] + ] + } + }, + "keywords": [ + "disaster", + "call", + "855" + ], + "description": "Collection of Acquisitions as Calibrated datasets for call 855", + "license": "CC-BY-SA", + "disaster:class": "acquisition", + "disaster:call_ids": [ + 855 + ] +} \ No newline at end of file diff --git a/examples/collection.json b/examples/collection.json deleted file mode 100644 index db17239..0000000 --- a/examples/collection.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "stac_version": "1.0.0", - "stac_extensions": [ - "https://stac-extensions.github.io/item-assets/v1.0.0/schema.json", - "https://stac-extensions.github.io/disasterscharter/v1.0.0/schema.json" - ], - "type": "Collection", - "id": "collection", - "title": "A title", - "description": "A description", - "license": "Apache-2.0", - "extent": { - "spatial": { - "bbox": [ - [ - 172.9, - 1.3, - 173, - 1.4 - ] - ] - }, - "temporal": { - "interval": [ - [ - "2015-06-23T00:00:00Z", - null - ] - ] - } - }, - "disasterscharter:new_field": "test", - "disasterscharter:xyz": { - "x": 1, - "y": 2, - "z": 3 - }, - "disasterscharter:another_one": [ - 1, - 2, - 3 - ], - "assets": { - "example": { - "href": "https://example.com/examples/file.xyz", - "disasterscharter:new_field": "test" - } - }, - "item_assets": { - "data": { - "roles": [ - "data" - ], - "disasterscharter:new_field": "test" - } - }, - "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" - } - ] -} diff --git a/examples/item.json b/examples/item.json deleted file mode 100644 index 1de8a51..0000000 --- a/examples/item.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "stac_version": "1.0.0", - "stac_extensions": [ - "https://stac-extensions.github.io/disasterscharter/v1.0.0/schema.json" - ], - "type": "Feature", - "id": "item", - "bbox": [ - 172.9, - 1.3, - 173, - 1.4 - ], - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - 172.9, - 1.3 - ], - [ - 173, - 1.3 - ], - [ - 173, - 1.4 - ], - [ - 172.9, - 1.4 - ], - [ - 172.9, - 1.3 - ] - ] - ] - }, - "properties": { - "datetime": "2020-12-11T22:38:32Z", - "disasterscharter:new_field": "test", - "disasterscharter:xyz": { - "x": 1, - "y": 2, - "z": 3 - }, - "disasterscharter:another_one": [ - 1, - 2, - 3 - ] - }, - "links": [ - { - "href": "https://example.com/examples/item.json", - "rel": "self" - } - ], - "assets": { - "data": { - "href": "https://example.com/examples/file.xyz", - "disasterscharter:new_field": "test" - } - } -} diff --git a/json-schema/schema.json b/json-schema/schema.json index 45a4169..05af32e 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://stac-extensions.github.io/disasterscharter/v1.0.0/schema.json#", + "$id": "https://terradue.github.io/disaster/v1.0.0/schema.json#", "title": "Disaster Charter Extension", "description": "STAC Disaster Charter Extension for STAC Items and STAC Collections.", "oneOf": [ @@ -14,8 +14,7 @@ "type": "object", "required": [ "type", - "properties", - "assets" + "properties" ], "properties": { "type": { @@ -26,20 +25,13 @@ { "$comment": "Require fields here for Item Properties.", "required": [ - "disasterscharter:new_field" + "disaster:class" ] }, { "$ref": "#/definitions/fields" } ] - }, - "assets": { - "$comment": "This validates the fields in Item Assets, but does not require them.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/fields" - } } } } @@ -70,7 +62,7 @@ { "$comment": "Require fields here for Collections (top-level).", "required": [ - "template:new_field" + "disaster:class" ] }, { @@ -78,56 +70,6 @@ } ] }, - { - "$comment": "This validates the fields in Collection Assets, but does not require them.", - "required": [ - "assets" - ], - "properties": { - "assets": { - "type": "object", - "not": { - "additionalProperties": { - "not": { - "allOf": [ - { - "$ref": "#/definitions/require_any_field" - }, - { - "$ref": "#/definitions/fields" - } - ] - } - } - } - } - } - }, - { - "$comment": "This is the schema for the fields in Item Asset Definitions. It doesn't require any fields.", - "required": [ - "item_assets" - ], - "properties": { - "item_assets": { - "type": "object", - "not": { - "additionalProperties": { - "not": { - "allOf": [ - { - "$ref": "#/definitions/require_any_field" - }, - { - "$ref": "#/definitions/fields" - } - ] - } - } - } - } - } - }, { "$comment": "This is the schema for the fields in Summaries. By default, only checks the existence of the properties, but not the schema of the summaries.", "required": [ @@ -152,7 +94,7 @@ "stac_extensions": { "type": "array", "contains": { - "const": "https://stac-extensions.github.io/disasterscharter/v1.0.0/schema.json" + "const": "https://terradue.github.io/disaster/v1.0.0/schema.json" } } } @@ -160,50 +102,131 @@ "require_any_field": { "$comment": "Please list all fields here so that we can force the existence of one of them in other parts of the schemas.", "anyOf": [ - {"required": ["template:new_field"]}, - {"required": ["template:xyz"]}, - {"required": ["template:another_one"]} + { + "required": [ + "disaster:class" + ] + }, + { + "required": [ + "disaster:call_ids" + ] + }, + { + "required": [ + "disaster:activation_id" + ] + }, + { + "required": [ + "disaster:types" + ] + }, + { + "required": [ + "disaster:country" + ] + }, + { + "required": [ + "disaster:regions" + ] + }, + { + "required": [ + "disaster:activation_status" + ] + }, + { + "required": [ + "disaster:disaster:resolution_class" + ] + } ] }, "fields": { "$comment": "Add your new fields here. Don't require them here, do that above in the corresponding schema.", "type": "object", "properties": { - "disasterscharter:new_field": { - "type": "string" + "disaster:class": { + "type": "string", + "enum": [ + "activation", + "area", + "acquisition", + "vap" + ] }, - "disasterscharter:xyz": { - "type": "object", - "required": [ - "x", - "y", - "z" - ], - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - } + "disaster:activation_id": { + "type": "integer", + "minimum": 1 + }, + "disaster:call_ids": { + "type": "array", + "items": { + "type": "integer", + "minimum": 1 } - }, - "disasterscharter:another_one": { - "type": "array", + }, + "disaster:types": { + "type": "array", "items": { - "type": "number" + "type": "string", + "enum": [ + "flood", + "fire", + "earthquake", + "volcano", + "storm_hurricane_rural", + "storm_hurricane_urban", + "flood_large", + "flood_flash", + "cyclone", + "tsunami", + "snow_hazard", + "landslide", + "ice", + "oil_spill", + "other" + ] } - } + }, + "disaster:country": { + "$comment": "ISO 3166-1 alpha-3 country code", + "type": "string", + "pattern": "^[A-Z]{3}$" + }, + "disaster:regions": { + "type": "array", + "items": { + "type": "string" + } + }, + "disaster:activation_status": { + "type": "string", + "enum": [ + "open", + "closed", + "archived" + ] + }, + "disaster:resolution_class": { + "type": "string", + "enum": [ + "VLR", + "LR", + "MR", + "HR", + "VHR" + ] + } }, "patternProperties": { - "^(?!disasterscharter:)": { - "$comment": "Above, change `disasterscharter` to the prefix of this extension" + "^(?!disaster:)": { + "$comment": "Above, change `disaster` to the prefix of this extension" } }, "additionalProperties": false } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 1e2e4e4..24f0b2f 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "scripts": { "test": "npm run check-markdown && npm run check-examples", "check-markdown": "remark . -f -r .github/remark.yaml", - "check-examples": "stac-node-validator . --lint --verbose --schemaMap https://stac-extensions.github.io/disasterscharter/v1.0.0/schema.json=./json-schema/schema.json", - "format-examples": "stac-node-validator . --format --schemaMap https://stac-extensions.github.io/disasterscharter/v1.0.0/schema.json=./json-schema/schema.json" + "check-examples": "stac-node-validator . --lint --verbose --schemaMap https://terradue.github.io/disaster/v1.0.0/schema.json=./json-schema/schema.json", + "format-examples": "stac-node-validator . --format --schemaMap https://terradue.github.io/disaster/v1.0.0/schema.jsonn=./json-schema/schema.json" }, "dependencies": { "remark-cli": "^8.0.0", @@ -15,6 +15,6 @@ "remark-preset-lint-markdown-style-guide": "^3.0.0", "remark-preset-lint-recommended": "^4.0.0", "remark-validate-links": "^10.0.0", - "stac-node-validator": "^1.0.0" + "stac-node-validator": "^1.2.2" } }