To run the gde-importer for the exposure model of the European Seismic Risk Model 2020 (ESRM20):
### Create necessary databases
1. Clone the ESRM20 repository to a local path of your choice following these
1. If it does not already exist, create the GDE Tiles database as shown [here](https://git.gfz-potsdam.de/dynamicexposure/globaldynamicexposure/database-gdetiles).
2. If it does not already exist, create the OBM Tiles database as shown [here](https://git.gfz-potsdam.de/dynamicexposure/openbuildingmap/database-obmtiles) and populate the `obm_built_area_assessments` table (using, for example, [obmgapanalysis](https://git.gfz-potsdam.de/dynamicexposure/openbuildingmap/obmgapanalysis)).
2. Copy the file `config-example.yml` to your working directory as `config.yml` and provide the
necessary parameters:
### Obtain data for the European Seismic Risk Model 2020 (ESRM20)
Currently the `gde-importer` only supports the European Seismic Risk Model 2020 (ESRM20). The data for ESRM20 needs to be retrieved and placed in appropriate directories before running `gde-importer`.
3. From the working directory (where you placed `config.yml`), run the code by typing:
```
1. Download main ESRM20 data.
gdeimporter
You can do this in two alternative ways:
```
1. In your shell: $ `wget --recursive --no-parent https://datasources.dynamicexposure.org/ESRM20/data/`
2. Clone the ESRM20 repository to a local path of your choice following these
*(Unfortunately we are not allowed to redistribute the data and you'll need a password to access the sources. [Read here](https://git.gfz-potsdam.de/dynamicexposure/datasources/-/tree/master/ESRM20_boundaries) for more information about the data being used.)*
3. Place the downloaded data into paths and directories of your preference.
### Configuration
## Configuration file (config.yml)
The file `config.yml` should contain the following parameters:
#### Quickstart:
Copy the file `config_example.yml` to your working directory as `config.yml` and provide the necessary parameters:
The following configuration options are available in the `config.yml`:
-`model_name`: Name of the input aggregated exposure model (only relevant for the user).
-`model_name`: Name of the input aggregated exposure model (only relevant for the user).
-`exposure_format`: Format of the input aggregated exposure model. Currently supported values: esrm20.
-`exposure_format`: Format of the input aggregated exposure model. Currently supported values: esrm20.
...
@@ -51,6 +69,18 @@ The file `config.yml` should contain the following parameters:
...
@@ -51,6 +69,18 @@ The file `config.yml` should contain the following parameters:
- "all": The list of names will be retrieved from the metadata of the input aggregated exposure model.
- "all": The list of names will be retrieved from the metadata of the input aggregated exposure model.
- A comma-space-separated list of entity names: This list of names will be used.
- A comma-space-separated list of entity names: This list of names will be used.
- A full path to a .txt or .csv file: The list of names will be retrieved from the indicated .txt/.csv file.
- A full path to a .txt or .csv file: The list of names will be retrieved from the indicated .txt/.csv file.
-`exposure_entities_code`: Either "ISO3" or a nested structure with exposure entities names and 3-character codes. For running ESRM20, "ISO3" is the preferred option.
-`number_cores`: Number of cores used for parallelisation.
-`database_built_up`: Credentials for the [database](https://git.gfz-potsdam.de/dynamicexposure/openbuildingmap/database-obmtiles#obm_built_area_assessments-completeness-assessments-information) where the built-up areas per quadtile are stored.
-`database_gde_tiles`: Credentials for the [database](https://git.gfz-potsdam.de/dynamicexposure/globaldynamicexposure/database-gdetiles) where information on the GDE tiles is stored.
## Running gde-importer
From the working directory (where you placed `config.yml`), run the code by typing: