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:

Driver: netCDF/Network Common Data Format
Files: ../../../.testdata/hazard/event_map.nc
Size is 10, 10
Coordinate System is:
GEOGCRS["WGS 84",
    DATUM["World Geodetic System 1984",
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
Origin = (4.350000000000000,52.049999999999997)
Pixel Size = (0.010000000000000,-0.010000000000000)
Metadata:
  Band1#grid_mapping=crs
  Band1#long_name=GDAL Band Number 1
  Band1#_FillValue=9.96921e+36
  crs#crs_wkt=GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
  crs#GeoTransform=4.35 0.01 0 52.05 0 -0.01 
  crs#grid_mapping_name=latitude_longitude
  crs#inverse_flattening=298.257223563
  crs#longitude_of_prime_meridian=0
  crs#long_name=CRS definition
  crs#semi_major_axis=6378137
  crs#spatial_ref=GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
  lat#long_name=latitude
  lat#standard_name=latitude
  lat#units=degrees_north
  lon#long_name=longitude
  lon#standard_name=longitude
  lon#units=degrees_east
  NC_GLOBAL#Conventions=CF-1.5
  NC_GLOBAL#GDAL=GDAL 3.9.2, released 2024/08/13
  NC_GLOBAL#history=Tue Oct 15 13:13:29 2024: GDAL Create( /home/runner/work/Delft-FIAT/Delft-FIAT/docs/examples/../../.testdata/hazard/event_map.nc, ... )
Corner Coordinates:
Upper Left  (   4.3500000,  52.0500000) (  4d21' 0.00"E, 52d 3' 0.00"N)
Lower Left  (   4.3500000,  51.9500000) (  4d21' 0.00"E, 51d57' 0.00"N)
Upper Right (   4.4500000,  52.0500000) (  4d27' 0.00"E, 52d 3' 0.00"N)
Lower Right (   4.4500000,  51.9500000) (  4d27' 0.00"E, 51d57' 0.00"N)
Center      (   4.4000000,  52.0000000) (  4d24' 0.00"E, 52d 0' 0.00"N)
Band 1 Block=10x1 Type=Float32, ColorInterp=Undefined
  NoData Value=9.96921e+36
  Metadata:
    NETCDF_VARNAME=Band1
    long_name=GDAL Band Number 1
    _FillValue=9.96921e+36
    grid_mapping=crs
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):

Driver: netCDF/Network Common Data Format
Files: ../../../.testdata/hazard/risk_map.nc
Size is 512, 512
Metadata:
  NC_GLOBAL#Conventions=CF-1.5
  NC_GLOBAL#GDAL=GDAL 3.9.2, released 2024/08/13
  NC_GLOBAL#history=Tue Oct 15 13:13:29 2024: GDAL Create( /home/runner/work/Delft-FIAT/Delft-FIAT/docs/examples/../../.testdata/hazard/risk_map.nc, ... )
Subdatasets:
  SUBDATASET_1_NAME=NETCDF:"../../../.testdata/hazard/risk_map.nc":Band1
  SUBDATASET_1_DESC=[10x10] Band1 (32-bit floating-point)
  SUBDATASET_2_NAME=NETCDF:"../../../.testdata/hazard/risk_map.nc":Band2
  SUBDATASET_2_DESC=[10x10] Band2 (32-bit floating-point)
  SUBDATASET_3_NAME=NETCDF:"../../../.testdata/hazard/risk_map.nc":Band3
  SUBDATASET_3_DESC=[10x10] Band3 (32-bit floating-point)
  SUBDATASET_4_NAME=NETCDF:"../../../.testdata/hazard/risk_map.nc":Band4
  SUBDATASET_4_DESC=[10x10] Band4 (32-bit floating-point)
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  512.0)
Upper Right (  512.0,    0.0)
Lower Right (  512.0,  512.0)
Center      (  256.0,  256.0)
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):

Driver: netCDF/Network Common Data Format
Files: ../../../.testdata/hazard/risk_map.nc
Size is 10, 10
Coordinate System is:
GEOGCRS["WGS 84",
    DATUM["World Geodetic System 1984",
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
Origin = (4.350000000000000,52.049999999999997)
Pixel Size = (0.010000000000000,-0.010000000000000)
Metadata:
  Band1#grid_mapping=crs
  Band1#long_name=GDAL Band Number 1
  Band1#return_period=2
  Band1#_FillValue=9.96921e+36
  crs#crs_wkt=GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
  crs#GeoTransform=4.35 0.01 0 52.05 0 -0.01 
  crs#grid_mapping_name=latitude_longitude
  crs#inverse_flattening=298.257223563
  crs#longitude_of_prime_meridian=0
  crs#long_name=CRS definition
  crs#semi_major_axis=6378137
  crs#spatial_ref=GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
  lat#long_name=latitude
  lat#standard_name=latitude
  lat#units=degrees_north
  lon#long_name=longitude
  lon#standard_name=longitude
  lon#units=degrees_east
  NC_GLOBAL#Conventions=CF-1.5
  NC_GLOBAL#GDAL=GDAL 3.9.2, released 2024/08/13
  NC_GLOBAL#history=Tue Oct 15 13:13:29 2024: GDAL Create( /home/runner/work/Delft-FIAT/Delft-FIAT/docs/examples/../../.testdata/hazard/risk_map.nc, ... )
Corner Coordinates:
Upper Left  (   4.3500000,  52.0500000) (  4d21' 0.00"E, 52d 3' 0.00"N)
Lower Left  (   4.3500000,  51.9500000) (  4d21' 0.00"E, 51d57' 0.00"N)
Upper Right (   4.4500000,  52.0500000) (  4d27' 0.00"E, 52d 3' 0.00"N)
Lower Right (   4.4500000,  51.9500000) (  4d27' 0.00"E, 51d57' 0.00"N)
Center      (   4.4000000,  52.0000000) (  4d24' 0.00"E, 52d 0' 0.00"N)
Band 1 Block=10x1 Type=Float32, ColorInterp=Undefined
  NoData Value=9.96921e+36
  Metadata:
    NETCDF_VARNAME=Band1
    long_name=GDAL Band Number 1
    _FillValue=9.96921e+36
    grid_mapping=crs
    return_period=2
Back to top