Types of hazard maps

Tip

The most advised format for both event and risk is netCDF.

Event

Event maps are generally supplied in singular fashion (i.e. one band per event map). This band just simply contains the hazard values per cell. Let’s have a quick peek at the data using gdalinfo:

ERROR 4: ../../../.testdata/hazard/event_map.nc: No such file or directory
gdalinfo failed - unable to open '../../../.testdata/hazard/event_map.nc'.
Note

Allthough netCDF is the preferred format, GeoTIFF’s are also very handy for single events.

As one can see, this dataset has only one band (variable).

When created, it is preferred that the event map is compressed to prevent unneccessary data on the hard drive. More information regarding the compression and others settings can be found here.

Risk

Risk maps in gerenal should contain multiple bands.

These bands can be either supplied in either one of two ways:

  • Multiple variables (like normal bands)
  • As a subdataset

Lets take a look quick look at the data (again with gdalinfo):

ERROR 4: ../../../.testdata/hazard/risk_map.nc: No such file or directory
gdalinfo failed - unable to open '../../../.testdata/hazard/risk_map.nc'.
Note

Instead of seeing normal metadata, we only get an overview of the available subdatasets.

Multiple netCDF variables are normally not recognized as bands by the netCDF driver of GDAL. Instead they are interpreted as subdatasets (!). One can set the key var_as_band to true within the settings file to read the subdatasets as bands.

[hazard]
file = <your-file>
risk = true
[hazard.settings]
var_as_band = true

When supplied in one subdataset (all bands are within that subdataset), the subset variable within the settings file should be set under the header hazard.settings. The value set to subset should be the name of the desired subdataset.

[hazard]
file = <your-file>
risk = true
[hazard.settings]
var_as_band = false
subset = <your-wanted-subdataset>

Return periods

The return periods can be set in the settings file by supplying a list via the hazard.return_periods entry. However, the return periods can also be set via the hazard bands directly from the return_period attribute of the bands. This attribute is simply set using either xarray, gdal or hydromt.

When present in all bands, this attribute will be preferred over the return periods specified in the settings file. The reason being that the return period is directly linked to the corresponding band, whereas it is inferred in the case of setting it via the settings file.

Let’s have a quick peek at the data using gdalinfo (it will be at the bottom):

ERROR 4: ../../../.testdata/hazard/risk_map.nc: No such file or directory
gdalinfo failed - unable to open '../../../.testdata/hazard/risk_map.nc'.
Back to top