Create a building maps from a DEM and a DSM

Note

DEM: Digital Elevation Model DSM: Digital Surface Model from the 2D simulation (DEM + buildings + walls + piers + …)

Steps:
  1. Load the DEM and DSM.

  2. Compute the difference between the DSM and the DEM using the calculator.

  3. Clean the difference to identify the buildings (apply a threshold on the difference, label and eliminate small patches, etc.).

  4. (Optional) Set unmasked values to 1 to create a binary image.

  5. Save the building map.

../_images/Wolf_DSM.png

DSM array

../_images/Wolf_DEM.png

DEM array

../_images/difference.png

Compute the difference (DSM - DEM)

../_images/difference_only.png

Analyzes the difference

../_images/difference_clean.png

Clean the difference

../_images/difference_clean_result.png

Result (before setting unmasked values to 1 if needed)

Attention

The result can be used in an inpainting algorithm to fill in the holes/gaps in the 2D results in order to compare flood inundations more easily.