
Mapper to InfeR River Observations of Widths from Remote Sensing: compute river surface width from a watermask image
Overview • Download and install • Features • Quick Start • Contribution •
Pronounce it "mirrors" !
MIRROWRS is a simple Python-based toolbox designed to compute river widths from a space-borne watermask given a set of section (line geometries) along the river.
Main version available on github : https://github.com/csgroup-oss/MIRROWRS
Using a virtual environment is strongly recommended.
python3 -m venv venv_mirrowrs
source venv_mirrowrs/bin/activate
pip install -e .
If you have python-3.12 and sw1Dto2D
is already installed, then running this command will install MIRROWRS requirements
# if gdal is not yet installed
pip install GDAL==`gdal-config --version`
pip install -e .
Using the MIRROWRS toolbox, you can perform two tasks :
- Given a watermask (as a GeoTiff file), a set on centerline reaches (as a shapefile of LineString) and a set of sections (as a shapefile of LineString), derive the river widths along the sections
- If the sections lines are not available, using the centerline reaches (as a shapefile of LineString) and a set of segmentation points (as a shapefile of Point), you can draw the sections yourself
To run functionnality tests, use the entrypoint
run_functionnality_tests
To use MIRROWRS on Surfwater watermasks, here is the general command
run_example -w /path/to/water_mask.tif -dt YYYYmmddThhmmss -r /path/to/eu_sword_reaches_hb23_v16.shp -n /path/to/eu_sword_nodes_hb23_v16.shp -o /path/to/output/directory
This will only save a csv file with widths data. You can had --more_outputs
to also save the cleaned watermask and the shapefile.
To do a bug report or a contribution, see the Contribution Guide. For project evolution, see Changelog.
See Authors file
MIRROWRS is licensed by CS GROUP under the Apache License, version 2.0. A copy of this license is provided in the LICENSE file.