StormPrep is a QGIS 3 plugin for hydrology-oriented terrain preparation. The first tool, Terrain Modification, burns simple trapezoidal channel sections, fill-only dam/berm features, and polygon-based ponds into a copied projected DEM raster.
- Select a file-backed single-band DEM raster.
- Require a projected, meter-based CRS and warn when it does not look like UTM.
- Select a line/multiline design layer for channels and dams, or a polygon/multipolygon layer for ponds.
- Use selected design features when present, otherwise use all features.
- Provide bottom width, minimum depth, side slope H:V, optional channel banks, and flexible longitudinal bed profiles.
- Add fill-only dams with flat crest width, side slopes, end treatment, and flexible crest profiles.
- Add ponds from bottom-bed or top-footprint polygons using bed elevation, top of bank elevation, and side slopes.
- Generate pond stage-storage and stage-area curves from the burned pond raster.
- Sketch existing DEM and proposed line profiles before burning channels or dams.
- Create a temporary modified raster by default, or write a chosen GeoTIFF when saving to disk is needed.
- Preserve source raster data and nodata cells.
- Copy the
StormPrepfolder into your QGIS plugin directory. - Restart QGIS or reload plugins.
- Enable
StormPrepfrom Plugins > Manage and Install Plugins. - Open Raster > StormPrep > Terrain Modification.
Typical Windows plugin directory:
%APPDATA%\QGIS\QGIS3\profiles\default\python\plugins
- Load a DEM raster in a UTM or other meter-based projected CRS.
- Load or draw a polyline layer for channel/dam centerlines, or a polygon layer for pond footprints.
- Select the DEM and design layer in the dialog.
- Use the Channels tab to enter the channel section:
- Bottom width in map units.
- Minimum depth in map units.
- Side slope as horizontal-to-vertical ratio.
- Channel end treatment: rounded ends or straight cut ends.
- Optional Apply channel with banks, bank width, bank crest mode, and outer bank slope H:V.
- Bank application rule: cut and fill reaches, only cut reaches, or only fill reaches.
- Longitudinal profile method:
- Slope from start elevation.
- Start and end elevations.
- CSV station/elevation profile.
- Use the Dams tab to enter a dam/berm section:
- Crest width in map units.
- Side slope as horizontal-to-vertical ratio.
- Dam end treatment: rounded ends or straight cut ends.
- Crest profile method:
- Constant crest elevation.
- Slope from start crest elevation.
- Start and end crest elevations.
- CSV station/elevation profile.
- Use the Ponds tab to enter a pond section:
- Polygon interpretation: bottom bed footprint or top footprint.
- Pond bed elevation.
- Top of bank elevation.
- Side slope as horizontal-to-vertical ratio.
- Stage interval for post-burn stage-storage/stage-area curves.
- Optional custom stage minimum and maximum.
- Leave Create temporary raster layer checked for quick testing, or uncheck it and choose an output
.tifpath to save the result. - Click Show Profile Sketch to compare the selected DEM profile against the proposed channel bed or dam crest. Pond sketches are not included in this first pond version.
- Run the active tab's burn and review the added output raster.
- After a successful pond burn, use Show Stage Curves or Export Stage CSV in the Ponds tab.
The MVP applies an absolute trapezoidal design profile. For slope and end-elevation methods, the start bed elevation is sampled from the selected DEM at the first vertex of each channel polyline by default. Turn off Use raster elevation at each channel start to enter one manual start bed elevation for all channel lines.
The first vertex of each channel polyline is station 0. For the slope method, positive channel slope lowers the bed elevation downstream:
bed_elevation = start_bed_elevation - channel_slope * station
For the end-elevation method, StormPrep linearly interpolates from start bed elevation at station 0 to the end bed elevation at the channel line length.
For CSV profiles, use either two unnamed columns or headers named station and elevation:
station,elevation
0,100.0
50,99.5
100,98.8CSV stations are measured along the selected channel polyline in raster map units. Values between rows are linearly interpolated. Stations beyond the CSV range use the nearest endpoint elevation.
Cells inside the bottom width are lowered to the bed elevation when the existing terrain is higher. Cells on side slopes taper upward from the bed elevation to the design depth at the influence edge.
When Apply channel with banks is checked, StormPrep preserves the proposed channel bed from the selected longitudinal profile. It compares that bed against the existing DEM to determine cut and fill areas, then applies channel side slopes up to a bank crest, a flat bank bench on both sides using the bank width, and outer bank slopes.
Bank crest can be defined in two ways:
- Height above existing ground: crest follows the existing channel-start terrain plus the entered bank height.
- Fixed crest elevation: crest uses one absolute elevation value.
Raised banks can fill terrain above the source DEM in the bank footprint, while the channel bed and inner side slopes can still cut downward. The minimum depth value is used to keep the bank crest at least that far above the proposed bed; it does not lower the proposed bed.
Use Apply banks in to control where bank benches/outer slopes are added:
- Cut and fill reaches applies banks everywhere along the line.
- Only cut reaches applies banks only where the proposed bed is below existing ground.
- Only fill reaches applies banks only where the proposed bed is at or above existing ground.
Where banks are skipped, the channel bed/profile can still be applied, but bank shaping is not added.
Rounded channel ends preserve the earlier rounded cap behavior at polyline endpoints. Straight cut ends stop the channel modification at the start and end stations.
The Dams tab creates a fill-only flat-crest embankment centered on the selected polyline. StormPrep computes the proposed crest elevation at each station, then skips that station when the existing centerline DEM is already at or above the crest. Within active dam sections, cells are raised only where the dam design surface is above the existing DEM; cells are never cut down. The side slopes descend outward from the flat crest and the fill footprint stops where the side slope ties back to the centerline ground elevation used for that station.
Dam crest profiles use the same station axis and CSV format as channel profiles. For the crest slope method, positive slope lowers the crest downstream:
crest_elevation = start_crest_elevation - crest_slope * station
The Ponds tab uses polygon features instead of polylines. In Bottom bed footprint mode, the polygon is treated as the flat pond bottom at the pond bed elevation, and side slopes extend outward until they reach the top of bank elevation. In Top footprint mode, the polygon is treated as the outer top-of-bank footprint, and side slopes extend inward toward the pond bottom. Pond modification can both cut and fill: cells above the designed pond surface are excavated, and cells below the designed surface are raised.
Pond stage curves are computed from the burned output raster. By default, stages run from pond bed elevation to top of bank elevation using the stage interval value, initially 0.1 m. Turn on Use custom stage range to enter a different minimum and maximum stage. The stage curve graph plots storage on the primary axis and inundated area on the secondary axis. CSV export writes:
stage_elevation,storage_cubic_meters,area_square_metersThe profile sketch samples the first selected channel line. If more than one line is selected or available, StormPrep shows the first one and adds a note in the sketch panel. The sketch refreshes automatically when relevant profile inputs change. Use the mouse wheel to zoom, drag to pan, double-click or click Reset Zoom to return to full extents, and hover over a line to inspect station/elevation values. Use Close to dismiss the panel.
The pure channel-profile logic can be tested outside QGIS with standard unittest:
python -m unittest discover -s StormPrep/testsQGIS integration modules import PyQGIS and GDAL from the QGIS Python environment, so full plugin testing should be done inside QGIS.
- Per-feature channel design attributes.
- Per-feature longitudinal profile attributes.
- Preview layers showing terrain modification footprints.
- Per-feature dam design attributes.
- Per-feature pond design attributes.
- Cut/fill reporting.