geosolutions-it / gfdrr-det

Data Exploration Tool
https://waffle.io/geosolutions-it/gfdrr-det
GNU General Public License v3.0
3 stars 0 forks source link

added more detail to the hazards details #141

Closed ricardogsilva closed 6 years ago

ricardogsilva commented 6 years ago

This PR improves the hazards detail endpoint with the following:

Example request:

/gfdrr_det/api/v1/hazards/1674/
{
  "title": "Eqk 18",
  "name": "eqk_18",
  "description": "USGS Shakemap us10001d1cy",
  "hazard_type": "earthquake",
  "url": "http://10.0.1.95:8000/gfdrr_det/api/v1/hazards/1674/?format=json",
  "wms_url": "http://10.0.1.95:8080/geoserver/hev-e/wms",
  "events": [
    {
      "id": 30,
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              31.4341,
              -20.5871
            ],
            [
              39.4341,
              -20.5871
            ],
            [
              39.4341,
              -12.9231
            ],
            [
              31.4341,
              -12.9231
            ],
            [
              31.4341,
              -20.5871
            ]
          ]
        ]
      },
      "properties": {
        "calculation_method": "SIM",
        "frequency": 0.00210526315789474,
        "occurrence_probability": null,
        "average_event_intensity": 0.435802296147318,
        "minimum_event_intensity": 0,
        "maximum_event_intensity": 23.67,
        "number_of_footprints": 6
      }
    }
  ]
}

Deployment to the test server

This PR requires that the existing HeveDetails layers be deleted and that the whole ingestion process be redone: