This MR adds the capability to export the GDE model to OpenQuake CSV format. The output consists of three kinds of files:
- OpenQuake CSV files.
- GeoPackage (.gpkg) with geometry of the quadtiles.
- GeoPackage (.gpkg) with geometry of the OBM buildings (created only if the user selects to export OBM buildings and sets
export_OBM_footprints'` to True).
This feature required the addition of the following parameters to the configuration file (and class):
output_path: Path where export files will be stored. The software creates a sub-directory under this path with name
exporter_YYYY_MM_DD_HH_MM_SS, so as to avoid involuntary overwriting of previous output results.
output_format: Format/s to which the GDE model will be exported. Currently supported values:
buildings_to_export: Types of buildings to export, separated by ", " (comma and space). Currently supported values:
export_OBM_footprints: True/False. If True, geometries of OBM buildings will be exported and parameters associated with these buildings will be attached to their original OSM ID. If False, the geometries will not be exported and anonymous IDs will be assigned to the parameters of the OBM buildings.
gde-exporter paralellises in terms of (
occupancy_case). The number of quadkeys groups depends on how the geographic selection is carried out (e.g. if the user passes a list of data unit IDs, each data unit ID is a
quadkeys_group). For each set of (
occupancy_case), the whole set of CSV and GPKG files is created. Within each (
occupancy_case) set, the
gde-exporter goes by quadkey, building the exposure associated with that quadtile and immediately dumping the data to the output files, which get appended with each new tile. The purpose of this is to avoid holding in memory a large amount of data before attempting to write it.