diff --git a/examples/gdacs-events/1102983.json b/examples/gdacs-events/1102983.json index 2d68fbc..5fde0b7 100644 --- a/examples/gdacs-events/1102983.json +++ b/examples/gdacs-events/1102983.json @@ -7,20 +7,21 @@ "id": "1102983", "collection": "gdacs-events", "bbox": [ - 103.279, - 31.0992, - 103.279, - 31.0992 + -3.4110253455683806, + 38.60133168687446, + -3.4110253455683806, + 38.60133168687446 ], "geometry": { "type": "Point", "coordinates": [ - 103.279, - 31.0992 + -3.4110253455683806, + 38.60133168687446 ] }, "properties": { - "datetime": "2008-05-12T06:28:00Z", + "start_datetime": "2024-10-27T15:00:00", + "end_datetime": "2024-11-04T11:00:00", "monty:country_codes": [ "CHN" ], @@ -32,7 +33,7 @@ "monty:corr_id": "20080512T062800Z-CHN-GEO-SEIS-001-GCDB", "roles": [ "event", - "reference" + "source" ], "keywords": [ "earthquake", @@ -51,7 +52,7 @@ "rel": "collection" }, { - "href": "https://monty-api.ifrc.org/stac/glide-events/EQ-2008-000062-CHN", + "href": "https://www.gdacs.org/gdacsapi/api/events/geteventdata?eventtype=FL&eventid=1102983", "rel": "via" }, { diff --git a/examples/gdacs-events/gdacs-events.json b/examples/gdacs-events/gdacs-events.json index 73d7cd9..952ee7e 100644 --- a/examples/gdacs-events/gdacs-events.json +++ b/examples/gdacs-events/gdacs-events.json @@ -8,6 +8,10 @@ "title": "GDACS Source Events", "description": "A collection of GDACS source events loaded into Monty", "license": "MIT", + "roles": [ + "event", + "source" + ], "extent": { "spatial": { "bbox": [ diff --git a/examples/gdacs-hazards/1102983.json b/examples/gdacs-hazards/1102983.json new file mode 100644 index 0000000..687d70b --- /dev/null +++ b/examples/gdacs-hazards/1102983.json @@ -0,0 +1,67 @@ +{ + "stac_version": "1.0.0", + "stac_extensions": [ + "https://ifrcgo.github.io/monty/v1.0.0/schema.json" + ], + "type": "Feature", + "id": "1102983", + "collection": "gdacs-events", + "bbox": [ + 103.279, + 31.0992, + 103.279, + 31.0992 + ], + "geometry": { + "type": "Point", + "coordinates": [ + 103.279, + 31.0992 + ] + }, + "properties": { + "datetime": "2008-05-12T06:28:00Z", + "monty:country_codes": [ + "CHN" + ], + "monty:hazard_codes": [ + "MH0004", + "MH0005", + "MH0006" + ], + "monty:corr_id": "20080512T062800Z-CHN-GEO-SEIS-001-GCDB", + "roles": [ + "event", + "source" + ], + "keywords": [ + "earthquake", + "china", + "Ground Shaking (Earthquake)", + "Earthquake Surface Rupture, Fissures, and Tectonic Uplift/Subsidence" + ] + }, + "links": [ + { + "href": "20080512T062800Z-CHN-GEO-SEIS-001-GCDB.json", + "rel": "self" + }, + { + "href": "gdacs-events.json", + "rel": "collection" + }, + { + "href": "https://monty-api.ifrc.org/stac/glide-events/EQ-2008-000062-CHN", + "rel": "via" + }, + { + "href": "20080512T062800Z-CHN-GEO-SEIS-001-GCDB.json", + "rel": "related", + "roles": [ + "hazard" + ], + "type": "application/json" + } + ], + "assets": {} +} \ No newline at end of file diff --git a/examples/gdacs-hazards/gdacs-hazards.json b/examples/gdacs-hazards/gdacs-hazards.json new file mode 100644 index 0000000..32e0ce7 --- /dev/null +++ b/examples/gdacs-hazards/gdacs-hazards.json @@ -0,0 +1,58 @@ +{ + "stac_version": "1.0.0", + "stac_extensions": [ + "https://ifrcgo.github.io/monty/v1.0.0/schema.json" + ], + "type": "Collection", + "id": "collection", + "title": "GDACS Hazards", + "description": "A collection of GDACS hazards loaded into Monty", + "license": "MIT", + "roles": [ + "hazard" + ], + "extent": { + "spatial": { + "bbox": [ + [ + -180, + -90, + 180, + 90 + ] + ] + }, + "temporal": { + "interval": [ + [ + "2000-01-01T00:00:00Z", + null + ] + ] + } + }, + "summaries": { + "datetime": { + "minimum": "2015-06-23T00:00:00Z", + "maximum": "2019-07-10T13:44:56Z" + }, + "roles": [ + "hazard" + ], + "monty:country_codes": [ + "CHN", + "SPN" + ], + "monty:hazard_codes": [ + "MH0004", + "MH0005", + "MH0006" + ] + }, + "links": [ + { + "href": "gdacs-events.json", + "rel": "self" + } + ] +} \ No newline at end of file diff --git a/examples/glide-events/glide-events.json b/examples/glide-events/glide-events.json index 998f991..f7c199e 100644 --- a/examples/glide-events/glide-events.json +++ b/examples/glide-events/glide-events.json @@ -8,6 +8,10 @@ "title": "GLIDE Source Events", "description": "A collection of GLIDE source events loaded into Monty", "license": "unknown", + "roles": [ + "event", + "source" + ], "extent": { "spatial": { "bbox": [ diff --git a/examples/reference-events/reference-events.json b/examples/reference-events/reference-events.json index e2eb373..66dcabc 100644 --- a/examples/reference-events/reference-events.json +++ b/examples/reference-events/reference-events.json @@ -8,6 +8,10 @@ "title": "Reference Events", "description": "A collection of reference events loaded into Monty", "license": "Apache-2.0", + "roles": [ + "event", + "reference" + ], "extent": { "spatial": { "bbox": [ diff --git a/json-schema/schema.json b/json-schema/schema.json index 31e29a4..d24cd62 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -59,6 +59,9 @@ "const": "Collection" } } + }, + { + "$ref": "#/definitions/roles" } ], "anyOf": [ @@ -123,6 +126,41 @@ }, "additionalProperties": false }, + "roles": { + "$comment": "Roles field", + "oneOf": [ + { + "$comment": "Reference Event", + "allOf": [ + { + "$ref": "#/definitions/is_event" + }, + { + "$ref": "#/definitions/is_reference" + } + ] + }, + { + "$comment": "Source Event", + "allOf": [ + { + "$ref": "#/definitions/is_event" + }, + { + "$ref": "#/definitions/is_source" + } + ] + }, + { + "$comment": "Hazard", + "allOf": [ + { + "$ref": "#/definitions/is_hazard" + } + ] + } + ] + }, "is_event": { "properties": { "roles": { @@ -133,6 +171,39 @@ } } } + }, + "is_reference": { + "properties": { + "roles": { + "type": "array", + "minItems": 2, + "contains": { + "const": "reference" + } + } + } + }, + "is_source": { + "properties": { + "roles": { + "type": "array", + "minItems": 2, + "contains": { + "const": "source" + } + } + } + }, + "is_hazard": { + "properties": { + "roles": { + "type": "array", + "minItems": 1, + "contains": { + "const": "hazard" + } + } + } } } } \ No newline at end of file diff --git a/model/sources.md b/model/sources.md index deb876f..ca052d8 100644 --- a/model/sources.md +++ b/model/sources.md @@ -61,6 +61,17 @@ Individual events can be accessed via the API endpoint `https://www.gdacs.org/gd * Documentation: https://www.gdacs.org/floodmerge/data_v2.aspx * Python lib: https://github.com/Kamparia/gdacs-api -#### Data conversion +### Event + +A GDACS event will **ALWAYS** produce an event STAC item as in the example [GDACS-2021-000001-IND](../examples/gdacs-events/GDACS-2021-000001-IND.json). + +Here is a table with the fields that are mapped from the GDACS event to the STAC event: + +| GDACS field | STAC field | Description | +| -------------------- | ------------------ | --------------------------------------------------------------------------------------- | +| bbox | bbox | Bounding box of the event | +| geometry | geometry | Geometry of the event | +| properties.eventtype | monty:hazard_codes | List of hazard codes converted following the GDACS event type to Hazard profile mapping | +| properties.eventid | id | Unique identifier for the event | + -* A GDACS evvent will **ALWAYS** produce an event STAC item as in the example [GDACS-2021-000001-IND](../examples/gdacs-events/GDACS-2021-000001-IND.json)