QGIS plugin · Version 0.5.0

FloodDepth

User Guide and Technical Manual
What it doesFlood extent, water depth and their uncertainty from satellite imagery and a DEM
AuthorEdmond Akello
Contactakelloedmond@gmail.com
ORCID0009-0009-5901-4574
Repositorygithub.com/EdmondAkello/Flood-Depth
QGIS3.44 to 4.x (Qt 5 and Qt 6 builds)
DOI10.5281/zenodo.24721636 (Zenodo, all versions)
Cite asAkello, E. (2026). FloodDepth: flood extent, depth and uncertainty from satellite imagery and a DEM in QGIS (version 0.5.0) [Software]. Zenodo. https://doi.org/10.5281/zenodo.24721637
LicenceGNU General Public License v3 or later
EditionDecember 2026 (version 0.5.0)

Cover: the Nyando floods on the Kano plains, 5 May 2024 - flood depth from FloodDepth (blue, darker is deeper) on the Sentinel-2 image in the plugin's 3D scene, vertical exaggeration 8×. Contains modified Copernicus Sentinel-2 data (2024). The worked examples use two flood events in Kenya, both from public data: Nyando (Sentinel-2, 5 May 2024) and the Mai Mahiu flash flood of 29 April 2024 (Sentinel-2 before and after, TanDEM-X). Every figure was produced by the plugin, or by QGIS from the plugin's outputs.

About this guide

Parts A and B take you from installing the plugin to a first depth map and its report. Part C is about what you do with the results afterwards: FloodDepth writes ordinary GeoTIFF rasters and GeoPackage polygons, and those feed exposure counts, depth-class maps, drawings and Google Earth files. Part D covers the other tools, Part E works through two real events from start to finish, and Part F holds the method, validation, limits and checklists. Every tool's Help button opens its own section of this guide, which is installed with the plugin and works offline.

0What FloodDepth does

FloodDepth turns a satellite image of a flood, or a flood-extent layer, and a DEM into a flood-depth map with uncertainty bands, in one run, entirely inside QGIS. It uses only NumPy and the GDAL bindings that QGIS ships. It starts no external program and needs no extra Python package, so it also works on managed workstations.

Water from imageryBands recognised from the downloaded files; NDWI + confident MNDWI or SAR; edge-based Otsu threshold; implausible thresholds refused, not used.
Floods that drainedFlood-trace mode maps vegetation stripped between two dates and separates inundation from mud, debris and scour.
DepthWater surface from the terrain along the flood edge (FwDET), outliers screened, steep ground protected; or from a HAND raster; depth = surface − DEM.
UncertaintyMonte Carlo ensemble with correlated DEM error, threshold and edge perturbation and method error: depth P10 / P50 / P90 and flood probability.
Layers you can useDepth, water surface, evidence and probability GeoTIFFs; flood polygons in a GeoPackage; styled and loaded into the map.
Report and 3DAn HTML report that prints to A4 PDF, and an interactive 3D scene of the terrain, the water and the mud, offline in any browser.
Not a hydraulic modelThe depths are terrain-based estimates from the flood edge. There is no flow, velocity, timing or backwater. Use them for rapid assessment, damage screening and to check or seed a hydraulic model.

Part AGetting started

Install the plugin, find its tools, and prepare the image and the DEM it needs.

1Overview and where to find it

PlaceWhat is there
Raster › FloodDepthQuick Flood Depth, Flood Depth over Time, Prepare DEM, Export 3D Scene, Classify Water from Imagery, Compare Flood Extents and this User Guide.
Raster toolbarTwo buttons: FloodDepth (a click opens Quick Flood Depth, the arrow lists the other tools) and FloodDepth User Guide (opens this guide).
Processing ToolboxEvery tool under FloodDepth, and Help › User guide (open). They run in batch mode, chain in the Graphical Modeler, log to the Processing history and can be called with processing.run().
Help buttonOpens the tool's section of this guide.
Toolbox groupTools
Flood depthQuick flood depth (image or extent + DEM) · Flood depth over time · Export 3D scene
DEM preparationPrepare DEM (merge tiles, clip, reproject)
Step by step1. Classify water from imagery · 1b. Classify water from training polygons · 2. Water surface and depth from a flood extent · 3. Flood depth from a water-surface raster · Flood depth below a constant water level
ValidationCompare flood extents (CSI, hit rate, false alarms)

2Installing and updating

3Preparing the inputs

The image

Select the files as they were downloaded; do not rename or stack them. Bands are recognised from their names (_B03_, SR_B3, VV ...) and the band descriptions inside the files.

SourceSelectWater index
Copernicus / EO BrowserDownload › Analytical, the Raw bands B02, B03, B04, B08, B11 (GeoTIFF)NDWI + confident MNDWI
Sentinel-2 SAFEthe band files of the L2A productNDWI + confident MNDWI
Landsat 8 / 9 C2SR_B2 to SR_B6NDWI + confident MNDWI
Browser "False color"the rendered composite (it has no SWIR1)NDWI only
Sentinel-1VV (and VH): linear, dB or Browser UINT16SAR backscatter, 5 × 5 speckle filter

True-colour pictures and rendered SAR images hold display colours, not reflectance; they are refused with the reason. Clouds are masked using the blue band (B02), so give it. For exact cloud and cloud shadow masking, also download the Scene Classification (SCL) layer of the same date (or the cloud mask CLM / cloud probability CLP) and select it with the bands: classes 3 (shadow), 8–9 (cloud) and 10 (cirrus) are masked. Pyramid and metadata files picked with the bands (.ovr, .aux.xml) are ignored, so you can select a whole folder. Radar and optical files together: the optical bands are used (choose the SAR water index for the radar); run them separately to compare. Give each band once; when a band is given twice (two downloads of one date) the finer copy is used and the log says so.

The DEM field takes elevations only. An 8-bit image with three bands, or a file named like a satellite product (Sentinel, B03, NDWI ...), is refused there: an image read as terrain gives depths of tens of metres.

The pre-event image and permanent water

Water that was there before the flood (lakes, rivers, dams) is not flood. Give a pre-event image of the same area, an ESA WorldCover tile (class 80), a JRC occurrence raster (≥ 50 %) or lake polygons. On a lake shore this is essential: at Nyando, Lake Victoria's Winam Gulf would otherwise count as 279 km² of flood.

Floods that drained before the overpass

Flash floods and debris flows are often gone before the next clear image. Choose Flood trace after the water drained and give a pre-event image: FloodDepth maps the vegetation stripped between the two dates and splits it into inundation (vegetation flattened) and erosion / deposition (bare soil, mud and debris, scour). Section 18 works through such an event.

4DEMs, tiles and the GEM 15 m DTM

The depth is only as good as the DEM under the flood edge. Prefer a bare-earth model (LiDAR, FABDEM, GEM) to a surface model (GLO-30, ALOS, TanDEM-X), where the edge sits on canopy and roofs.

DEMCellError used (1σ)Notes
LiDAR / drone DTM< 5 m0.15 mbest; put "lidar", "drone" or "survey" in the file name for the preset
FABDEM30 m1.5 mbare earth (forests and buildings removed)
Google GEM 15 m DTM15 m2.0 mbare earth at twice the resolution of the 30 m products
Copernicus GLO-30, TanDEM-X30 m2.0 msurface models
ALOS AW3D3030 m2.5 mwhole metres: flat floodplains are stepped
SRTM / NASADEM30 m4.0 molder, noisier

The DEM error is taken from the file name when it names the product; otherwise 2 m is assumed and the report says so. Set DEM vertical error to override it. A geographic (latitude / longitude) DEM is analysed in the WGS 84 / UTM zone of the area.

Tiled DEMs

Give one tile as the DEM and the rest under More DEM tiles, or select every tile. FloodDepth combines them into a virtual mosaic and reads only the cells under the image or area of interest, so a 30 000 × 30 000 tile costs no more than a small clip. Tiles in other coordinate systems are left out, and the report says which.

The Google GEM 15 m DTM for Kenya

Why there is no depression fillingHydrology tools (QEHT) fill sinks so water can drain. FloodDepth must not: filling raises the ground exactly where flood water stands, and the depth is the water surface minus the real ground. Prepare DEM (section 12) merges, clips, reprojects and checks the DEM, but never fills it.

Part BThe one-click workflow

Quick flood depth runs the whole chain into one output folder: water mask, extent, water surface, depth, uncertainty, report and 3D scene.

5Running Quick flood depth

  1. Open it from the FloodDepth button, Raster › FloodDepth › Quick Flood Depth, or the Toolbox.
  2. Satellite image file(s): the post-event bands (or, instead, a flood-extent polygon layer).
  3. DEM and, for tiled DEMs, More DEM tiles.
  4. Pre-event image file(s) or a Permanent water raster; for a drained flood, the mode Flood trace.
  5. Area of interest for a large scene: the image and the DEM are read only around it.
  6. Output folder, then Run. Depth, extent and evidence load into the map; the report and the 3D scene are in the folder.
Quick flood depth dialog
Figure 1. Quick flood depth. The main inputs are on top; method settings and map colours are under Advanced (all listed in appendix A).

Map colours

The report maps, the 3D scene, the loaded depth layer and the evidence.tif palette share the colours set under Advanced › Map colours: the depth ramp (Blues, Viridis, Yellow-green-blue or Magma; the last three are colour-blind safe) and the depth at its dark end (3 m by default; lower it for shallow ponding, raise it for valley floods), and the colours of permanent water , the flood edge , doubtful cells and mud and debris . QGIS remembers the last values you used.

6The run report

report.html opens in any browser. To keep a PDF, print it (Chrome or Edge: Save as PDF, A4): the pages are numbered, the maps keep their colours, and the collapsed sections open for printing.

Run report, Nyando
Figure 2. The top of the Nyando report: key figures with their P10–P90 range, the link to the 3D scene, the contents, Check these, and the depth and probability maps over the satellite image.
SectionRead it for
Check theseWarnings about the result: doubtful cells, low separability, steep flow paths, erosion, DEM defects, memory. Read it first.
MapsDepth over the image (pink = doubtful, hatched = NoData or cloud) framed on the main flood with an inset of the whole area; flood probability; and the evidence map (mud and debris in brown).
Depth, UncertaintyArea by depth class; statistics for all flood cells and for the interior (without the edge ring, where depth is about 0 by construction); the ensemble's P10 / P50 / P90 of area, mean depth and volume.
What the extent is based onArea, depth, band width and probability per evidence class.
Water surface, ClassificationEdge cells used and dropped, edge lift; the index, threshold, separability (eta), cloud share and cleanup.
Inputs, Processing logFiles, grid, settings, every step taken and the time by stage.

7The output folder

FileContentLoaded
depth.tifFlood depth (m), float32, NoData −9999 outside the floodyes, styled
depth_refined.tifThe same depth on a grid 2× finer (option Refined depth, up to 4×): the water surface interpolated bilinearly, minus the DEM read on the finer grid; the flood edge follows the 0.5 contour of the interpolated mask, so it is smooth instead of stepped. Use it for maps and exposure overlays; use depth.tif for statistics (the report's figures come from it).yes, styled
flood_extent.gpkgLayer flood_extent: flood polygons (valid geometries, area in m²); layer waterline: the edge cells used for the water surfaceyes
evidence.tifWhat each flood cell is based on, with a colour table (appendix B)yes
wse.tifWater-surface elevation (m, the DEM's datum); with HAND, the water height above drainageyes (Load every output, on by default)
depth_p10 / p50 / p90.tifEnsemble depth percentiles (a dry member counts as 0 m)as above
flood_probability.tifShare of ensemble members flooded (0–1)as above
water_mask.tifThe classification on the image grid: 1 flood, 2 permanent, 0 dryas above
report.htmlThe run report (section 6)
scene3d.htmlThe interactive 3D scene (section 8)
run.jsonEvery number and decision of the report, machine-readable

All rasters share one projected grid (the DEM's lattice, or the local UTM zone for a geographic DEM), so they stack in the Raster Calculator without resampling.

8The 3D scene

scene3d.html is one self-contained file that opens offline in Chrome, Edge, Firefox or Safari. It shows the terrain draped with the satellite image (or a hillshade when there is no image), with permanent water and doubtful cells painted on it; the flood water as a surface coloured by depth; mud and debris as their own brown surface in flood-trace runs; the flood edge; and the connectivity features and area of interest when given.

3D scene, Mai Mahiu
Figure 3. The Mai Mahiu scene: the mud and debris left by the flash flood (brown), the remaining water (blue) and the main reach (red) on the terrain draped with the post-event image.

The terrain is block-averaged so the file stays light (600 000 vertices per surface by default; Nyando at 60 m cells: 4.2 MB; Mai Mahiu at 31 m: 1.1 MB). Switch the scene off in the dialog, or rebuild it with other layers and detail with Export 3D scene (section 16).

A sharper basemap and labelled places

3D scene: basemap to drape takes any map layer: a high-resolution satellite basemap added through Browser › XYZ Tiles (Esri World Imagery, Google Satellite), a drone orthophoto or a WMS. It is rendered over the scene at up to 4096 pixels and draped on the terrain as a texture at its own resolution - a 1 m basemap shows roofs, fields and roads that the 30 m terrain mesh cannot - with its attribution in the bottom-right corner (taken from the layer, or typed in basemap attribution). Without a basemap the post-event satellite image is draped.

The scene opens on the basemap; switch between it and the satellite image under Ground colour (Basemap (draped image) / As exported). If the basemap comes back as one flat colour - the tiles did not load (offline, rate-limited) - the image is draped instead and the log says so: pan the map over the area once so the tiles load, then run Export 3D scene.

Check the provider's terms before sharing a scene with a commercial basemap. The HTML embeds a rendered copy of the imagery. Esri's basemap terms, for example, allow screen captures and printed maps with attribution to Esri and its data providers but not redistributing basemap tiles; Google's are stricter. Sentinel-2 imagery is free to share with "Contains modified Copernicus Sentinel data".

3D scene: places to label takes a point layer - towns, schools, hospitals, gauges, bridges - and shows each point inside the scene as a pin with its name (the chosen field, or the first text field).

Part CWorking with the layers

The report is one product; the rasters and polygons are the others. They are standard GeoTIFF and GeoPackage files that every GIS, CAD and modelling tool reads.

9The layers in QGIS

After a run every output is in the Layers panel, in a group named after the output folder: the refined and the analysis depth, evidence and extent styled with the run's colours, then the water surface, P10 / P50 / P90, probability and the water mask (untick Load every output to load only the first four). Continuous rasters are shown with bilinear resampling, so the cells do not show as blocks when you zoom in; classes (evidence, water mask) stay crisp. Restyle them like any layer (Layer Properties › Symbology); the Identify tool reads depths cell by cell.

Nyando depth in a QGIS print layout
Figure 4. The Nyando depth raster and flood polygons over the Sentinel-2 image, in a QGIS print layout with legend, scale bar and north arrow.

10Rasters and polygons for other work

Each recipe uses standard QGIS Processing tools on FloodDepth's outputs. They were run on the Nyando outputs while writing this guide; the numbers and figure 5 are the results.

Depth classes as polygons (for maps, CAD, report tables)

Reclassify by table (native:reclassifybytable) › Polygonize (gdal:polygonize) › Dissolve (native:dissolve)

Reclassify depth.tif with the rows 0–0.5 → 1, 0.5–1 → 2, 1–2 → 3, 2–1000 → 4 (range boundaries min < value ≤ max), polygonize to a field class, dissolve by class. Nyando: 66.6 km² at 0–0.5 m, 2.1 km² at 0.5–1 m, 1.3 km² at 1–2 m and 1.4 km² deeper.

Depth classes as polygons
Figure 5. Depth classes as a dissolved polygon layer.

Depth per flood polygon

Zonal statistics (native:zonalstatisticsfb)

Input flood_extent, raster depth.tif, statistics mean, minimum and maximum: each polygon gets d_mean, d_min, d_max. The flood polygons are valid geometries, so zonal statistics, clip and dissolve accept them as they are. At Nyando the largest polygon (23.5 km²) has a mean depth of 0.12 m.

Buildings, roads or plots affected

Zonal statistics (polygons) · Sample raster values (native:rastersampling, points) · Extract by location (native:extractbylocation)

Run zonal statistics with your building footprints or plots and depth.tif (maximum) and flood_probability.tif (mean); sample depth.tif and depth_p90.tif at point assets; extract the roads that intersect flood_extent. Filter on, say, d_max > 0.3 for a damage count, and report the P90 count next to it.

A threshold mask: where water was deeper than 0.5 m

Raster calculator (native:rastercalc)

The expression "depth@1" >= 0.5 gives a 0 / 1 raster; polygonize it for a vector. Use "depth_p90@1" >= 0.5 for a cautious version.

Water-level contours

Contour (gdal:contour)

Contours of wse.tif at 0.5 m show how the water surface falls along the valley; they are lines of equal water level, ready for a drawing.

Clip to a boundary, or hand over a smaller file

Clip raster by mask layer (gdal:cliprasterbymasklayer) · Clip (native:clip)

Clip the rasters to a ward, a catchment or a project boundary, and the polygons with the same boundary.

11Exporting: GIS, CAD, Google Earth, PDF

ForHow
Shapefile, GeoJSONRight-click Flood extent › Export › Save Features As, or native:savefeatures
Google Earth (KML)Save Features As, format KML (written in WGS 84); the depth classes of section 10 give a coloured KML
CAD (DXF)Project › Import/Export › Export Project to DXF with the depth-class polygons and water-level contours
Hydraulic modelsdepth.tif and wse.tif as initial conditions or calibration targets; flood_extent.gpkg as an observed extent
Cloud-optimised GeoTIFFTranslate (gdal:translate), format COG
Maps for reportsA QGIS print layout (figures 4, 5, 9 and 11), or print report.html to PDF
3D viewsSave PNG or A3 sheet in scene3d.html

Part DThe other tools

12Prepare DEM

Makes one analysis-ready DEM from tiles: merged, clipped to an extent with a buffer, reprojected to the WGS 84 / UTM zone of the area (or a CRS you choose) with bilinear or cubic resampling, float32, compressed. A DEM already in the target CRS at the target cell keeps its cells exactly. Use it when the same area is analysed many times, or to share a DEM; Quick flood depth reads tiles directly too.

Draw a clip extent. Without one, the whole mosaic is prepared: the six Kenya GEM tiles of UTM zone 36S make a DEM of about 4 billion cells (16 GB uncompressed) that takes several minutes even with the threaded warp. Clipped to the flood plus a 1 km buffer it prepares in seconds. The tool warns when the output will be very large.

Prepare DEM dialog
Figure 6. Prepare DEM; the extent can be taken from a layer or the map canvas.

The output is checked, and the findings go to the log and a .json file beside it: repeated rows or columns (nearest-neighbour resampling upstream: the copies make steps that the flood-edge levels pick up, so nearest neighbour is not offered) and whole-metre storage on flat ground (flood-edge levels are rounded to the step). The same check runs in every Quick flood depth run.

13Flood depth over time

Select the band files of several dates together. They are grouped by the date in their names (YYYY-MM-DD, YYYY_MM_DD or YYYYMMDD); each date runs Quick flood depth in its own sub-folder with the same DEM, permanent water, area of interest and settings. A date with no water left is reported and skipped.

FileContent
max_depth.tifDeepest water seen at each cell on any mapped date
dates_flooded.tifNumber of dates each cell was flooded
first_date_flooded.tifFirst date flooded (1 = first date; the dates are in the file tags)
series.html, series.csvArea, depth and volume per date with P10–P90 bars, charts spaced by time, the maximum-depth map
Comparable datesGive an area of interest so every date covers the same ground. Sentinel-1 maps less of a shallow flood among crops than Sentinel-2; the summary warns when dates mix sensors. The 3D scene is off by default here (one per date when switched on).

14Step-by-step tools

ToolInputs → outputs
1. Classify water from imageryImage files (water or flood-trace mode) → water mask raster and water polygons
1b. Classify water from training polygonsRGB, drone or aerial image + water and non-water polygons you draw → water mask and polygons, for scenes where the indices fail
2. Water surface and depth from a flood extentFlood polygons or a mask raster + DEM (or HAND) → water-surface and depth rasters, optionally the waterline points used and dropped
3. Flood depth from a water-surface rasterA known surface (hydraulic model, surveyed flood marks) − DEM → depth
Flood depth below a constant water levelA lake or reservoir level, a flood mark, a what-if level → depth

15Compare flood extents

Scores an extent (raster or polygons) against a reference (a Copernicus EMS product, a surveyed extent, a hydraulic model): critical success index (CSI), hit rate, false-alarm ratio, bias and F1, with an agreement raster (hit, miss, false alarm).

16Export 3D scene

Rebuilds scene3d.html from a finished run's output folder (it reads run.json and the DEM again), so you can add line or polygon layers (roads, rivers, boundaries), change the level of detail or set the vertical exaggeration without running the analysis again. The basemap and places options are the same as in Quick flood depth (section 8); the rendered basemap is kept as scene3d_basemap.tif in the run folder.

Export 3D scene dialog
Figure 7. Export 3D scene.

Part EWorked examples

Two real events, run with Quick flood depth at default settings (20-member ensemble). They show behaviour, not accuracy: there are no independent depth measurements for either event.

17Nyando, Kano plains (standing flood)

In early May 2024 the Nyando River flooded the Kano plains and the Ahero and West Kano rice schemes, next to the Winam Gulf of Lake Victoria. The Sentinel-2 overpass of 5 May caught the water standing.

InputUsed
ImageSentinel-2 L2A, 5 May 2024, Copernicus Browser Raw bands B02, B03, B04, B08, B11 (8-bit with a data-mask band, recognised automatically)
DEMFABDEM 30 m (error preset 1.5 m); repeated with the GEM 15 m DTM
Permanent waterESA WorldCover tile, class 80: 279 km² of the Winam Gulf removed
ResultFABDEM 30 mGEM 15 m
Index, threshold (eta)NDWI + confident MNDWI, −0.239 (0.75, good); cloud 10 %
Flooded area (P10–P90)71.4 km² (62.9–125.1)67.5 km² (55.0–101.9)
Mean depth, all / interior0.17 / 0.18 m0.32 / 0.39 m
Interior median, P900.06, 0.38 m0.17, 1.04 m
Volume12.4 Mm³21.6 Mm³
Method error (cross-validation)0.07 m0.42 m
Evidenceobserved water 50.7 km², steep 0.5 km², doubtful 20.3 km²observed water 42.2 km², steep 3.0 km², doubtful 22.3 km²
Run time (2 cores)27 s36 s

Reading it. Most of the mapped water is a shallow sheet over the rice schemes and the fringes of the plain; the coherent bodies along the Nyando reach and the south-west plain are 0.5–1.5 m deep. About 28 % of the flood cells are doubtful: mapped as water, but their ground lies above the estimated surface. Most are wet paddies and crops classed as water; the report shows them in pink, and the interior statistics exclude the edge ring. The 15 m GEM DTM resolves the drains and embankments of the schemes, so it finds deeper water in the channels (P90 1.04 m against 0.38 m) and a larger method error. The extreme maximum on GEM (33.7 m) is a single DEM pit; check such cells before quoting a maximum. Given the benchmark (section 20), depths on this flat plain are more likely low than high.

3D scene Nyando
Figure 8. Nyando in 3D: the flood water coloured by depth on the plains, with the Winam Gulf at the lower left (vertical exaggeration 8×).

18Mai Mahiu (flash flood, mud and debris)

On 29 April 2024 a flash flood broke through a blocked railway culvert above Mai Mahiu and swept a debris flow down the valley through the settlement. By the next clear image (12 May) the water had gone; what remained was a path of mud, debris and scour. The post-event image shows almost no water, and water mode refuses it with that reason.

InputUsed
ModeFlood trace after the water drained
ImagesSentinel-2 L2A Raw bands, 7 April 2024 (before) and 12 May 2024 (after)
DEMTanDEM-X 30 m (error preset 2.0 m), analysed at 31 m in UTM 37S
ConnectivityThe main reach of the valley: keeps 11 trace regions, drops 2 132 unrelated changes (crops, cloud)
ResultValue
Index, threshold (eta)NDVI change, tile-based Otsu −0.080 (0.51, low: weakly two-class)
Trace area (P10–P90)1.93 km² (1.2–2.9)
Evidencemud, debris, scour 1.30 km² (67 %); steep flow path 0.51 km²; inundation 0.10 km²; doubtful 0.02 km²
Depth of the water that passed, interiormean 2.05 m, median 1.42 m, P90 4.68 m
Method error, edge lift1.51 m, 0.48 m
Run time6 s
Mai Mahiu evidence
Figure 9. The flood-trace evidence in QGIS: mud, debris and scour (brown) dominate the fan below the gorge and the path through the town; the gorge itself is steep flow path (red).
Mai Mahiu report maps
Figure 10. The Mai Mahiu report: the depth and probability maps and, below, the evidence map with the mud and debris.

Reading it. Two thirds of the trace is bare soil, mud or fresh sediment: the main remnant of the event, and the report, the evidence layer and the 3D scene (figure 3) show it as such. The depths are those of the water that passed, on the pre-event ground; where the flood scoured or buried the ground the pre-event DEM no longer describes it, so treat them as indicative. The ensemble says so plainly: the trace threshold is weakly constrained (eta 0.51), the method error is 1.5 m, and the bands are widest on the steep flow path. The deepest cells are in the incised gorge, where the trace edge is the gully rim: an upper bound, not a water depth.

Mai Mahiu depth
Figure 11. The estimated depth of the water that passed, along the debris path.

Part FTechnical reference

19Method

Water classification

NDWI (green, NIR) marks water; MNDWI (green, SWIR1) adds only its confident part (above max(threshold, 0.3)), which catches turbid water without the wet-soil over-mapping of MNDWI alone. The threshold is an edge-based Otsu (Donchyts et al. 2016) seeded at the physical value (0 for the indices, −16 dB for SAR VV), with a separability score eta; a threshold outside the physically usual range is refused. Pixels brighter in SWIR1 (B11) than open water ever is (reflectance above 0.15: dry soil, roofs, haze, thin cloud) are left out of the threshold and the water - this stopped cloud edges being mapped as water in a dry scene and cut false alarms on Sen1Floods11 from 16 % to 9 %. When the threshold is uncertain (eta below 0.65), cloud shadow within 1.5 km of cloud must have NDWI above 0 to count as water. Small patches are removed and clouds masked from the blue band, or from an SCL / cloud-mask file when given. In flood-trace mode the index is the NDVI change between the two dates.

Water surface and depth

The waterline is the flood cells next to valid dry ground; edges against NoData, cloud or permanent water are not used. Edge cells whose level departs from their neighbours by more than three robust standard deviations (embankments, canopy) are dropped, except on steep ground. The edge water level is lifted halfway up the step to the first dry cell (cap 1 m). The surface is interpolated by inverse distance from the edge (GDAL FillNodata, run per group of flood clusters) and lightly smoothed; depth = surface − DEM, clipped at 0 (Cohen et al. 2018).

Uncertainty and evidence

Each of 20 members redraws a spatially correlated DEM error (σ from the DEM, correlation 150 m), the threshold within its near-optimal band and the area-fraction cut-off (or shifts the edge for polygons), adds extra terrain error in erosion / deposition cells, and adds the method error estimated by a blocked cross-validation of the waterline. Members run in parallel threads with independent random streams, so the result does not depend on the thread count. The evidence layer classes each flood cell (appendix B).

Full detail and the reasoning behind each choice: DOCUMENTATION.md in the repository.

20Validation

21Known limitations

22Speed and memory

23Quality-control checklist

  1. Read Check these in the report.
  2. Compare the water mask with the image: is the extent water, or wet soil, crops, shadow or cloud?
  3. Separability (eta) of 0.65 or more; below that, try an area of interest or a manual threshold.
  4. Permanent water removed (lakes, rivers, dams)?
  5. Doubtful share: a large share means the extent includes high ground; trust the interior statistics more.
  6. DEM: bare earth or surface model? Any DEM warning (repeated rows, whole metres)?
  7. Uncertainty: report P10–P90 with every number; a wide band on a cell means its depth is weak evidence.
  8. Flood trace: depths in mud and debris cells are indicative; maxima in gorges are upper bounds.
  9. Look at the 3D scene: does the water surface sit sensibly in the valley?

24Troubleshooting

MessageWhat to do
Could not find the bands for an automatic water indexGive the Raw bands (green, NIR, SWIR1), not a rendered picture; or set the band numbers of a multiband file.
The automatic threshold is outside the rangeThe image probably shows little or no water (drained flood: use flood-trace mode), or cloud and shadow dominate. Set a manual threshold only if you are sure.
No water was foundAs above; check the date and the bands.
Only n waterline cells were foundThe flood does not border dry ground with valid terrain: the DEM does not cover around the flood, or the extent is clipped at the image edge.
The analysis grid ... needs about n GBGive an area of interest or a larger cell size.
... does not overlap the analysis areaThe DEM and the image cover different places; check both CRSs.
The 3D scene could not be writtenThe run itself is complete; rebuild the scene with Export 3D scene and a lower level of detail.

AppendicesReference tables

AParameter reference (Quick flood depth)

ParameterDefaultMeaning
IMAGESPost-event image file(s)
EXTENTFlood-extent polygons instead of an image
DEM, DEM_TILESThe DEM; more tiles mosaicked with it
PRE_IMAGESPre-event image (permanent water; required for flood trace)
MODEwaterWater at the overpass, or flood trace
AOIArea of interest
PERM_RASTER, PERM_POLYS, PERM_VALUESautoPermanent water; raster values (auto, 80, >=50 ...)
SEEDS, SEED_BUFFER30 mKeep flooding connected to these features
METHOD, HANDDEMFlood-edge elevation (FwDET) or height on a HAND raster
MEMBERS20Ensemble members (0 = off)
DEM_SIGMA, CORR0 (from name), 150 mDEM error and its correlation length
SCENE3DonWrite scene3d.html
DRAPEnone3D scene: a map layer draped as the terrain texture (the image when empty)
DRAPE_CREDIT / DRAPE_PXfrom the layer / 4096Basemap attribution; texture size
POIS / POI_FIELD / POI_COLORnone3D scene: places shown as labelled pins
REFINE2× finerWrite depth_refined.tif (off, 2×, 3×, 4×)
INDEX, THRESHOLD, TMETHODauto, empty, edgeWater index, manual threshold, threshold method
B_GREEN … B_BLUE0Band numbers in an unnamed multiband file
MIN_WATER, MAX_HOLE10, 0 cellsRemove small patches; fill dry holes
CLOUD0.25Bright-cloud blue reflectance limit
CELL0 (DEM)Analysis cell size
INTERP, SMOOTH, SMOOTH_TOLIDW, 2, 0.5 mSurface interpolation and smoothing
EDGE_STEP, EDGE_CAP0.5, 1 mEdge water level within the step to the first dry cell
OUT_RADIUS, OUT_K, OUT_MIN10, 3, 0.5 mEdge outlier screen
STEEP10 %Steep ground: flow path, not ponding
ERO_SIGMA1 mExtra terrain error in erosion / deposition cells
RNG_SEED42Random seed
DEPTH_RAMP, DEPTH_MAXBlues, 3 mDepth colours
COL_PERM, COL_EDGE, COL_DOUBT, COL_MUDPermanent water, flood edge, doubtful, mud and debris colours
LOAD_ALLonLoad every output (in a layer group per run)
OUT_DIROutput folder

From the Python console:

processing.run("flooddepth:quickflooddepth", {"IMAGES": ["B02.tif", "B03.tif", "B04.tif", "B08.tif", "B11.tif"],
    "DEM": "fabdem.tif", "PERM_RASTER": "worldcover.tif", "OUT_DIR": "C:/floods/nyando"})

BOutput values and fields

LayerValue / fieldMeaning
evidence.tif0extent from polygons
1observed water at the overpass
2trace – inundation (vegetation flattened, still vegetated)
3trace – erosion / deposition: mud, debris, scour (the DEM may be outdated there)
4steep flow path (slope > 10 %): water flowed, did not pond
5doubtful: ground above the estimated water surface (depth 0)
255NoData
water_mask.tif0 / 1 / 2 / 255dry / flood water / permanent water / NoData
Float rasters−9999NoData (outside the flood, or no data)
flood_extentarea_m2polygon area (m²)
sourceimage or polygons
waterlineused1 used for the surface, 0 dropped as an outlier
zground level of the edge cell (m)
surfacewater level assigned to it (m)

CReferences