TerraHidro Wiki Page

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
start [2023/06/16 16:34]
alexandre [Example 1: drainage network and minibasins]
start [2024/05/21 15:10] (current)
alexandre [Download]
Line 4: Line 4:
   * Last stable release:\\   * Last stable release:\\
  
-- Windows (01/06/2023): [[http://​www.dpi.inpe.br/​terrahidro/​download/​TerraHidro-5.2.0.exe|TerraHidro-5.2.0.exe]]\\+- Windows (21/05/2024): [[http://​www.dpi.inpe.br/​terrahidro/​download/​TerraHidro-5.2.0.exe|TerraHidro-5.2.0.exe]]\\
 - Linux (10/​05/​2023):​ [[http://​www.dpi.inpe.br/​terrahidro/​download/​terrahidro-5.2.0.tar.gz|terrahidro-5.2.0.tar.gz]] - Linux (10/​05/​2023):​ [[http://​www.dpi.inpe.br/​terrahidro/​download/​terrahidro-5.2.0.tar.gz|terrahidro-5.2.0.tar.gz]]
  
Line 64: Line 64:
 </​code>​ </​code>​
  
-The minibasins ​raster can be vectorized ​with some tools from QGIS. The next commands use the tools available in QGIS 3.22.9 under Windows, where the directory //​C:​\Program Files\QGIS 3.22.9\apps\Python39\Scripts//​ contains the scripts **gdal_sieve.bat** and **gdal_polygonize.bat**,​ and the directory //​C:​\Program Files\QGIS 3.22.9\bin//​ contains the script **grass78.bat**. Both directories were added to the PATH environment variable before executing the scripts. ​The script ​**generalize_polygon.bat** ​sets the method ​and the parameters for smoothing the polygons ​([[http://​www.dpi.inpe.br/​terrahidro/​download/​generalize_polygon.bat|generalize_polygon.bat]]),​ writing the vector ​file tocantinsMinibasinsSmooth.gpkg as output (if necessary, the correct path to the data must be changed inside the script).+Additional steps can be executed to produce high-quality vector data. The vectorized drainage network generated with the **d8drainagev** functionality simply joins all the drainage network cells that are connected by the D8 flow directions. This procedure generates a vectorized drainage network that contains lines in a raster ​pattern, which can be improved ​with some tools from QGIS that smooth the lines for more natural drainage flows. Besides the drainage network, the minibasins raster can be also vectorized, and each polygon smoothed in order to improve the limits of the minibasins. 
 + 
 +The next commands use the tools available in QGIS 3.22.9 under Windows, where the directory //​C:​\Program Files\QGIS 3.22.9\apps\Python39\Scripts//​ contains the scripts **gdal_sieve.bat** and **gdal_polygonize.bat**,​ and the directory //​C:​\Program Files\QGIS 3.22.9\bin//​ contains the script **grass78.bat**. Both directories were added to the PATH environment variable before executing the scripts. ​In addition, the scripts ​**generalize_line.bat** ​([[http://​www.dpi.inpe.br/​terrahidro/​download/​generalize_line.bat|generalize_line.bat]]) ​and **generalize_polygon.bat** ​([[http://​www.dpi.inpe.br/​terrahidro/​download/​generalize_polygon.bat|generalize_polygon.bat]]) ​set the method and the parameters for smoothing the lines and polygons, respectively, writing the vector ​files tocantinsDrainageSmooth.gpkg and tocantinsMinibasinsSmooth.gpkg as output (if necessary, the correct path to the data and file names must be changed inside the scripts).
 <​code>​ <​code>​
 +C:​\data>​grass78.bat --tmp-location tocantinsDrainage.shp --exec generalize_line.bat
 C:​\data>​gdal_sieve.bat -st 3 tocantinsMinibasins.tif tocantinsMinibasins3.tif C:​\data>​gdal_sieve.bat -st 3 tocantinsMinibasins.tif tocantinsMinibasins3.tif
 C:​\data>​gdal_polygonize.bat tocantinsMinibasins3.tif -f GPKG tocantinsMinibasins.gpkg C:​\data>​gdal_polygonize.bat tocantinsMinibasins3.tif -f GPKG tocantinsMinibasins.gpkg
Line 311: Line 314:
   * inputDrainage.tif - input drainage network (raster).   * inputDrainage.tif - input drainage network (raster).
   * outputSAND.tif - output Slope Above Nearest Drainage (raster).   * outputSAND.tif - output Slope Above Nearest Drainage (raster).
 +**gfplain** - Generates the floodplain grid from a DEM grid, a D8 flow directions grid, a contributing area grid, a drainage network grid, and parameter b of power law.
 +<​code>​
 +th gfplain inputDEM.tif inputD8.tif inputContributingArea.tif inputDrainage.tif inputB outputFloodplain.tif
 +</​code>​
 +  * inputDEM.tif - input DEM (raster).
 +  * inputD8.tif - input D8 flow directions (raster).
 +  * inputContributingArea.tif - input contributing area (raster).
 +  * inputDrainage.tif - input drainage network (raster).
 +  * inputB - parameter b of power law.
 +  * outputFloodplain.tif - output floodplain delineated from water heights on drainage network (raster).
 **segments** - Generates the segments from a D8 flow directions grid and a drainage network grid. **segments** - Generates the segments from a D8 flow directions grid and a drainage network grid.
 <​code>​ <​code>​
Line 358: Line 371:
   * inputSources.shp - input drainage source points to initiate flow paths (vector).   * inputSources.shp - input drainage source points to initiate flow paths (vector).
   * outputFlowPaths.tif - output flow paths that follow the D8 flow directions from each drainage source point (raster).   * outputFlowPaths.tif - output flow paths that follow the D8 flow directions from each drainage source point (raster).
 +**watercourses** - Generates water courses from contributing areas.
 +<​code>​
 +th watercourses inputD8upstream.tif inputContributingArea.tif outputWaterCourses.tif
 +</​code>​
 +  * inputD8upstream.tif - input D8 upstream flow directions (raster).
 +  * inputContributingArea.tif - input contributing area (raster).
 +  * outputWaterCourses.tif - output water courses formed upstream by following the largest contributing areas (raster).
 **fill** - Fills voids of a DEM data (e.g. SRTM 30 m) using a reference DEM data (e.g. SRTM 90 m). **fill** - Fills voids of a DEM data (e.g. SRTM 30 m) using a reference DEM data (e.g. SRTM 90 m).
 <​code>​ <​code>​

QR Code
QR Code start (generated for current page)