Skip to content

Refactoring losscalculator to adapt augmented exposure model files as input

The calculator is now modified to use the augmented exposure model files in stead of the regular exposure model files.
Augmented exposure file format:

"id","lon","lat","taxonomy","number","structural","night","occupancy","admin_name","admin_ID","tile_id","tile_geometry","building_id","building_geometry"

Regular exposure file format:

id,lon,lat,taxonomy,number,structural,night,occupancy,admin_name,admin_ID,origin_id

(Please note that origin_id in the exposure model can be either a tile or a building id depending on the exposure type.) The major changes are:

  • Removal of three inputs to the calculator:
  1. --cell-ids
  2. geometries(But this input is needed to turn a regular exposure model into an augmented one)
  3. --exposure-type. The calculator does not care anymore if the input assets are either of building or cell type. The input exposure model can be a mixture of both assets now.
  • Deleting the function Add_cell_ids_to_building_exposure.py. This function was used to attach IDs of the cell that contained the building assets to the exposure files. An augmented exposure file now contains the cell-ids for building assets.

  • Modifying example folder and remove the extra inputs that are no more of use.

  • Removing the function origin_id_to_geometry(geometry_source, exposure_type) from losslib.py. The augmented exposure model files now have the geometries of either cells and buildings attached.

Please read #36 (closed) for more info.

\fyi @shinde @cnievas
\approve @fd @ds

Edited by Tara Evaz Zadeh

Merge request reports

Loading