Skip to content

Commit

Permalink
Add GDACS hazards data and update event roles in JSON examples
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Nov 8, 2024
1 parent 14e845f commit d20c3be
Show file tree
Hide file tree
Showing 8 changed files with 231 additions and 11 deletions.
19 changes: 10 additions & 9 deletions examples/gdacs-events/1102983.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand All @@ -32,7 +33,7 @@
"monty:corr_id": "20080512T062800Z-CHN-GEO-SEIS-001-GCDB",
"roles": [
"event",
"reference"
"source"
],
"keywords": [
"earthquake",
Expand All @@ -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"
},
{
Expand Down
4 changes: 4 additions & 0 deletions examples/gdacs-events/gdacs-events.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
67 changes: 67 additions & 0 deletions examples/gdacs-hazards/1102983.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
58 changes: 58 additions & 0 deletions examples/gdacs-hazards/gdacs-hazards.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
4 changes: 4 additions & 0 deletions examples/glide-events/glide-events.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
4 changes: 4 additions & 0 deletions examples/reference-events/reference-events.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
71 changes: 71 additions & 0 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
"const": "Collection"
}
}
},
{
"$ref": "#/definitions/roles"
}
],
"anyOf": [
Expand Down Expand Up @@ -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": {
Expand All @@ -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"
}
}
}
}
}
}
15 changes: 13 additions & 2 deletions model/sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit d20c3be

Please sign in to comment.