Plugin icon

TopoDrain

Plugin ID: 4187

!!Experimental!! - wait for stable release! A QGIS plugin for planning surface drainage water management like Keyline-Design.

(4) votes 
 Download latest
This plugin has an experimental version available!

It automates the extraction of main valleys and ridges, creates off-contour line and supports creating Keyline Designs and other water-retention planning measures. The tool can also be used for other tasks, such as planning the location and alignment of paths and roads.
DISCLAIMER: Influencing surface runoff on land is complex and requires significant expertise. This tool is intended as an aid for users with experience in land surface water management.

Core algorithms leverage WhiteboxTools (Lindsay, 2017–2020; see https://github.com/jblindsay/whitebox-tools).
So make shure you have installed and configured the plugin "WhiteboxTools for QGIS" (i.e. see https://www.youtube.com/watch?v=xJXDBsNbcTg).

This plugin requires several Python packages (numpy, rasterio, shapely, pandas, geopandas, scipy). These are NOT always included in the default QGIS Python environment. Most QGIS installations need only rasterio.

For help installing Python packages in QGIS, see:
- Windows, QGIS installed with OSGeo4W: https://landscapearchaeology.org/2018/installing-python-packages-in-qgis-3-for-windows/
- macOS (terminal): https://gis.stackexchange.com/questions/351280/installing-python-modules-for-qgis-3-on-mac

These links show how to use pip to install dependencies. When using pip take care to install compatible python package versions:
- Open OSGeo4W Shell (Windows, QGIS installed with OSGeo4W) or Terminal (Mac/Linux/Windows without OSGeo4W) (see provided links above)
- Check installed packages with version information: pip list
- Install missing packages with version constraint: pip install rasterio "numpy==YOUR_VERSION"
- This prevents pip from upgrading numpy which may breaks QGIS compatibility
Do the same for other missing packages if not already installed (e.g. pandas, geopandas):
- pip install pandas "numpy==YOUR_VERSION"
- pip install geopandas "pandas==YOUR_VERSION"

Alternatively: Use QGIS Plugin "qpip" for installing the python packages (fast but not recommended because can lead to incompatible versions). If so delete folder "dependencies" in "...\QGIS\QGIS3\profiles\default\python\" and try to install with pip as explained above.

A series of manual videos will follow soon: How to install a plugin with dependencies; how to use the tool, i.e. how to create a keyline design.

Version QGIS >= QGIS <= Date
0.1.5 3.0.0 3.99.0 21 topodrain 2025-09-22T17:34:23.003821+00:00
0.1.4 3.0.0 3.99.0 53 topodrain 2025-09-11T16:07:54.188282+00:00

QGIS sustaining members

Flagship membership


Flagship membership


Flagship membership


Large membership


Large membership


Large membership


Large membership


Large membership


Large membership


Large membership


Large membership