agentsoz / ees-ui

Emeregency Evacuation Simulator (EES) - Web Client
3 stars 2 forks source link

Consolidate region, phoenix fire event and population configuration #19

Closed ayoung012 closed 4 years ago

ayoung012 commented 4 years ago

Currently the fire datasets and their information are spread across the server and UI source. Adding more datasets requires the project source to be rebuilt and redeployed.

The solution is to consolidate this to a central point to be managed/updated as required. The structure should be along the lines of the following:

The ees-server should take these as a single source of truth, and provide endpoints for the UI to list the current fires/populations available for a given region, and get further details on a specific fire event or population.

fire index file example:

[
  {
    "id":"Anglesea_FFDI104 PHX5 2016 MINSUP FH2017 GRID",
    "metadata":"filehost.com/Anglesea_FFDI104_PHX5_2016_MINSUP_FH2017_GRID.info.json"
  },
  {
    "id":"Anglesea_FFDI105 PHX5 2016 MINSUP FH2017 GRID",
    "metadata":"filehost.com/Anglesea_FFDI105_PHX5_2016_MINSUP_FH2017_GRID.info.json"
  }
]

// or simply urls if id is not important
[
    "filehost.com/Anglesea_FFDI104_PHX5_2016_MINSUP_FH2017_GRID.info.json",
    "filehost.com/Anglesea_FFDI105_PHX5_2016_MINSUP_FH2017_GRID.info.json"
]

Individual fire metadata:

// Anglesea_FFDI104_PHX5_2016_MINSUP_FH2017_GRID.info.json
{
  "id":
    "Anglesea_evac_test_ffdi104_phx5_2016data_minsup_fh2017_grid_WSG84",
  "name": "Anglesea_FFDI104 PHX5 2016 MINSUP FH2017 GRID",
  "ignition": "12:00",
  "description": "12:00 point fire ignition",
  "geojson":
    "https://raw.githubusercontent.com/agentsoz/ees/f25dd3427060180f08716c25198d5b6e0e530fd9/scenarios/surf-coast-shire/data/phoenix/Anglesea_evac_test_ffdi104_phx5_2016data_minsup_fh2017_gri
d_WSG84.json",
  "smokeGeojson":
    "https://raw.githubusercontent.com/agentsoz/ees/master/scenarios/surf-coast-shire/population-subgroups/scenario_smoke.json",
  "tags":"FH2017,FFDI104"
}

The population index file and individual population metadata should follow a similar pattern

Individual population metadata:

// Anglesea_pop_normal_day_50k.info.json
{
  "id":
    "Anglesea_pop_normal_day_50k",
  "name": "Anglesea normal 50k",
  "description": "A normal day in Anglesea",
  "geojson/xml?":
    "https://filehost.com/matsim_plans.xml.gz",
  "tags":"normal,weekday"
}

@dhixsingh to provide urls to working sets of fire event and population index files, and ensure he is able to edit them without changing the url

dhixsingh commented 4 years ago

See above commit @ayoung012 with the required info.

Note that a separate URL is not required for the embers file, it is actually part of the Phoenix grid output, where the fire shape is given by the HOUR_BURNT attribute, and the ember front by HOUR_SPOT. So both should be drawn from the same shape. If this is not how the UI currently does it, could you please make it so (and track in a separate issue).

ayoung012 commented 4 years ago

Thanks @dhixsingh , please see issue #21 and associated commits resolving your ember data comment.

Region, fire event and population data are consolidated on the server. You may experience about a minutes delay in being able to select fire event/populations in the UI while the ees-server 'wakes up'.