Skip to content

Instantly share code, notes, and snippets.

@willemarcel
Last active March 30, 2022 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willemarcel/828ecfbf18d57c0a4650e9a67fc0728f to your computer and use it in GitHub Desktop.
Save willemarcel/828ecfbf18d57c0a4650e9a67fc0728f to your computer and use it in GitHub Desktop.
hazard-schemas payload
{
"country_iso": "PHL",
"is_global": false,
"entries": [
{
"hazard_type": 2,
"always_applicable": true,
"geography_classes": [],
"geography_distance": {},
"geography_comparator": "lt",
"threshold_key": "intensity",
"threshold_value": 0,
"threshold_comparator": "gt",
"dataset_ids": [1]
},
{
"hazard_type": 3,
"always_applicable": false,
"geography_classes": [],
"geography_distance": {},
"geography_comparator": "lt",
"threshold_key": "intensity",
"threshold_value": 1,
"threshold_comparator": "gt",
"dataset_ids": [6]
},
{
"hazard_type": 1,
"always_applicable": false,
"geography_classes": [],
"geography_distance": {},
"geography_comparator": "lt",
"threshold_key": "distance",
"threshold_value": 25000,
"threshold_comparator": "lt",
"dataset_ids": [3]
},
{
"hazard_type": 11,
"always_applicable": false,
"geography_classes": [
"coastline"
],
"geography_distance": {
"coastline": 2000
},
"geography_comparator": "lt",
"threshold_key": "intensity",
"threshold_value": 0,
"threshold_comparator": "gt",
"dataset_ids": [4]
},
{
"hazard_type": 4,
"always_applicable": true,
"geography_classes": [],
"geography_distance": {},
"geography_comparator": "lt",
"threshold_key": "intensity",
"threshold_value": 0,
"threshold_comparator": "gt",
"dataset_ids": [7]
},
{
"hazard_type": 6,
"always_applicable": true,
"geography_classes": [],
"geography_distance": {},
"geography_comparator": "lt",
"threshold_key": "",
"threshold_value": 0,
"threshold_comparator": "lt",
"dataset_ids": []
},
{
"hazard_type": 15,
"always_applicable": false,
"geography_classes": [
"coastline"
],
"geography_distance": {
"coastline": 5
},
"geography_comparator": "gt",
"threshold_key": "intensity",
"threshold_value": 0,
"threshold_comparator": "gt",
"dataset_ids": [2]
},
{
"hazard_type": 14,
"always_applicable": false,
"geography_classes": [],
"geography_distance": {},
"geography_comparator": "lt",
"threshold_key": "intensity",
"threshold_value": 0,
"threshold_comparator": "gt",
"dataset_ids": []
},
{
"hazard_type": 8,
"always_applicable": false,
"geography_classes": [
"coastline"
],
"geography_distance": {
"coastline": 5000
},
"geography_comparator": "lt",
"threshold_key": "intensity",
"threshold_value": 0,
"threshold_comparator": "gt",
"dataset_ids": []
},
{
"hazard_type": 9,
"always_applicable": false,
"geography_classes": [
"forest"
],
"geography_distance": {
"forest": 4000
},
"geography_comparator": "lt",
"threshold_key": "intensity",
"threshold_value": 0,
"threshold_comparator": "gt",
"dataset_ids": []
},
{
"hazard_type": 10,
"always_applicable": true,
"geography_classes": [],
"geography_distance": {},
"geography_comparator": "lt",
"threshold_key": "",
"threshold_value": 0,
"threshold_comparator": "gt",
"dataset_ids": []
},
{
"hazard_type": 5,
"always_applicable": false,
"geography_classes": [],
"geography_distance": {},
"geography_comparator": "lt",
"threshold_key": "intensity",
"threshold_value": 0,
"threshold_comparator": "gt",
"dataset_ids": []
},
{
"hazard_type": 16,
"always_applicable": true,
"geography_classes": [],
"geography_distance": {},
"geography_comparator": "lt",
"threshold_key": "intensity",
"threshold_value": 0,
"threshold_comparator": "gt",
"dataset_ids": []
},
{
"hazard_type": 12,
"always_applicable": false,
"geography_classes": [],
"geography_distance": {},
"geography_comparator": "lt",
"threshold_key": "intensity",
"threshold_value": 0,
"threshold_comparator": "gt",
"dataset_ids": []
},
{
"hazard_type": 13,
"always_applicable": false,
"geography_classes": [],
"geography_distance": {},
"geography_comparator": "lt",
"threshold_key": "intensity",
"threshold_value": 0,
"threshold_comparator": "gt",
"dataset_ids": []
}
]
}
@LanesGood
Copy link

@willemarcel this should be corrected to match https://gist.github.com/LanesGood/7ff33eca586949894ff11813e4a3e11b

{
  "entries": [
    {
      "hazard_type": 2,
      "always_applicable": true,
      "geography_classes": [],
      "geography_distance": {},
      "geography_comparator": "lt",
      "threshold_key": "intensity",
      "threshold_value": 0,
      "threshold_comparator": "gt",
      "datasets": [
        {
          "id": 1,
          "name": "Earthquake",
          "source": "ThinkHazard! GAR",
          "license": "ODbL/OSM",
          "active": true,
          "resolution": null,
          "hazard_category": 1,
          "countries": [
            "PHL"
          ],
          "bounds": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  -180.036007201,
                  -90.036
                ],
                [
                  -180.036007201,
                  90.000007201
                ],
                [
                  180.036007201,
                  90.000007201
                ],
                [
                  180.036007201,
                  -90.036
                ],
                [
                  -180.036007201,
                  -90.036
                ]
              ]
            ]
          },
          "intensity_label": "Peak Ground Acceleration | cm/s²",
          "intensity_category": null,
          "is_global": true
        }
      ]
    },
    {
      "hazard_type": 3,
      "always_applicable": false,
      "geography_classes": [],
      "geography_distance": {},
      "geography_comparator": "lt",
      "threshold_key": "intensity",
      "threshold_value": 1,
      "threshold_comparator": "gt",
      "datasets": [
        {
          "id": 6,
          "name": "Landslide",
          "source": "thinkhazard",
          "license": "Public Domain",
          "active": true,
          "resolution": null,
          "hazard_category": 1,
          "countries": [
            "PHL"
          ],
          "bounds": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  -180,
                  -59.523431323
                ],
                [
                  -180,
                  81.857369698
                ],
                [
                  179.99995,
                  81.857369698
                ],
                [
                  179.99995,
                  -59.523431323
                ],
                [
                  -180,
                  -59.523431323
                ]
              ]
            ]
          },
          "intensity_label": null,
          "intensity_category": {
            "Very Low": "0",
            "Low": "1",
            "Medium": "2",
            "High": "3"
          },
          "is_global": true
        }
      ]
    },
    {
      "hazard_type": 1,
      "always_applicable": false,
      "geography_classes": [],
      "geography_distance": {},
      "geography_comparator": "lt",
      "threshold_key": "distance",
      "threshold_value": 25000,
      "threshold_comparator": "lt",
      "datasets": [
        {
          "id": 3,
          "name": "Volcano Locations",
          "source": "NOAA",
          "license": "Public Domain",
          "active": true,
          "resolution": null,
          "hazard_category": 1,
          "countries": [],
          "bounds": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  -179.97,
                  -78.5
                ],
                [
                  -179.97,
                  88.27
                ],
                [
                  179.62,
                  88.27
                ],
                [
                  179.62,
                  -78.5
                ],
                [
                  -179.97,
                  -78.5
                ]
              ]
            ]
          },
          "intensity_label": "Distance | m",
          "intensity_category": null,
          "is_global": true
        }
      ]
    },
    {
      "hazard_type": 11,
      "always_applicable": false,
      "geography_classes": [
        "coastline"
      ],
      "geography_distance": {
        "coastline": 2000
      },
      "geography_comparator": "lt",
      "threshold_key": "intensity",
      "threshold_value": 0,
      "threshold_comparator": "gt",
      "datasets": [
        {
          "id": 4,
          "name": "Storm Surge",
          "source": "NOAH",
          "license": "Public Domain",
          "active": true,
          "resolution": null,
          "hazard_category": 3,
          "countries": [
            "PHL"
          ],
          "bounds": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  116.928864582,
                  4.640566254
                ],
                [
                  116.928864582,
                  20.836241876
                ],
                [
                  126.604965594,
                  20.836241876
                ],
                [
                  126.604965594,
                  4.640566254
                ],
                [
                  116.928864582,
                  4.640566254
                ]
              ]
            ]
          },
          "intensity_label": "Storm Surge | m",
          "intensity_category": null,
          "is_global": false
        }
      ]
    },
    {
      "hazard_type": 4,
      "always_applicable": true,
      "geography_classes": [],
      "geography_distance": {},
      "geography_comparator": "lt",
      "threshold_key": "intensity",
      "threshold_value": 0,
      "threshold_comparator": "gt",
      "datasets": [
        {
          "id": 7,
          "name": "Tropical Cyclone",
          "source": "thinkhazard",
          "license": "Public Domain",
          "active": true,
          "resolution": null,
          "hazard_category": 2,
          "countries": [
            "PHL"
          ],
          "bounds": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  115.974998474,
                  2.949885025
                ],
                [
                  115.974998474,
                  22.024981856
                ],
                [
                  128.10225481,
                  22.024981856
                ],
                [
                  128.10225481,
                  2.949885025
                ],
                [
                  115.974998474,
                  2.949885025
                ]
              ]
            ]
          },
          "intensity_label": "Wind Speed | m/s",
          "intensity_category": null,
          "is_global": false
        }
      ]
    },
    {
      "hazard_type": 6,
      "always_applicable": false,
      "geography_classes": [],
      "geography_distance": {},
      "geography_comparator": "lt",
      "threshold_key": "",
      "threshold_value": 0,
      "threshold_comparator": "lt",
      "datasets": []
    },
    {
      "hazard_type": 15,
      "always_applicable": false,
      "geography_classes": [],
      "geography_distance": {},
      "geography_comparator": "gt",
      "threshold_key": "intensity",
      "threshold_value": 0,
      "threshold_comparator": "gt",
      "datasets": [
        {
          "id": 2,
          "name": "LiPAD Flood Hazard",
          "source": "lipad",
          "license": "Public Domain",
          "active": true,
          "resolution": null,
          "hazard_category": 3,
          "countries": [
            "PHL"
          ],
          "bounds": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  116.927085876,
                  4.645416736
                ],
                [
                  116.927085876,
                  21.11960615
                ],
                [
                  126.604538959,
                  21.11960615
                ],
                [
                  126.604538959,
                  4.645416736
                ],
                [
                  116.927085876,
                  4.645416736
                ]
              ]
            ]
          },
          "intensity_label": "Inundation Height | m",
          "intensity_category": {
            "high": "1.5",
            "medium": "0.5-1.5",
            "low": "0.1-0.5"
          },
          "is_global": false
        }
      ]
    },
    {
      "hazard_type": 14,
      "always_applicable": false,
      "geography_classes": [],
      "geography_distance": {},
      "geography_comparator": "lt",
      "threshold_key": "intensity",
      "threshold_value": 0,
      "threshold_comparator": "gt",
      "datasets": []
    },
    {
      "hazard_type": 8,
      "always_applicable": false,
      "geography_classes": [
        "coastline"
      ],
      "geography_distance": {
        "coastline": 5000
      },
      "geography_comparator": "lt",
      "threshold_key": "intensity",
      "threshold_value": 0,
      "threshold_comparator": "gt",
      "datasets": []
    },
    {
      "hazard_type": 9,
      "always_applicable": false,
      "geography_classes": [
        "closed_forest"
      ],
      "geography_distance": {
        "closed_forest": 3000
      },
      "geography_comparator": "lt",
      "threshold_key": "intensity",
      "threshold_value": 0,
      "threshold_comparator": "gt",
      "datasets": []
    },
    {
      "hazard_type": 10,
      "always_applicable": true,
      "geography_classes": [],
      "geography_distance": {},
      "geography_comparator": "lt",
      "threshold_key": "",
      "threshold_value": 0,
      "threshold_comparator": "gt",
      "datasets": []
    },
    {
      "hazard_type": 5,
      "always_applicable": false,
      "geography_classes": [],
      "geography_distance": {},
      "geography_comparator": "lt",
      "threshold_key": "intensity",
      "threshold_value": 0,
      "threshold_comparator": "gt",
      "datasets": []
    },
    {
      "hazard_type": 16,
      "always_applicable": true,
      "geography_classes": [],
      "geography_distance": {},
      "geography_comparator": "lt",
      "threshold_key": "intensity",
      "threshold_value": 0,
      "threshold_comparator": "gt",
      "datasets": []
    },
    {
      "hazard_type": 12,
      "always_applicable": false,
      "geography_classes": [],
      "geography_distance": {},
      "geography_comparator": "lt",
      "threshold_key": "intensity",
      "threshold_value": 0,
      "threshold_comparator": "gt",
      "datasets": []
    },
    {
      "hazard_type": 13,
      "always_applicable": false,
      "geography_classes": [],
      "geography_distance": {},
      "geography_comparator": "lt",
      "threshold_key": "intensity",
      "threshold_value": 0,
      "threshold_comparator": "gt",
      "datasets": []
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment