RiverSectionsExtractor

RiverSectionsExtractor takes the cross sections of a river from an elevation model, along the line of the river. They are the geometry of the river for the 1D hydraulic models: SaintGeo, the model of the HortonMachine, and HEC-RAS, through HecrasInputBuilder.

The sections are perpendicular to the line, at a given interval along it, and reach a given distance from it on each side. Their points are taken from the elevation model, one for each cell crossed. The module writes three vectors: the section lines, the points of the sections with their elevation, and the points of the river between the sections. The hydraulic modules need all three.

The line has to be drawn from upstream to downstream, along the bottom of the channel. A network extracted from the elevation model, as the one of NetworkAttributesBuilder, works, but it follows the cells in steps of 45 degrees, and the sections, perpendicular to its local direction, would turn back and forth. Smooth it first, and simplify it, so that the sections follow the direction of the valley. The sections must not cross each other: in the bends they can reach at most as far as the radius of the bend.

Details

The line of the river has to be drawn from upstream to downstream, along the bottom of its channel. If it is made of several lines, they are merged: when they do not form a single line, the longest one is used.

The sections are perpendicular to the line, at the given interval along it, and reach the given distance from it on each side. Their points are taken from the elevation model, one for each cell crossed. As they are perpendicular to the local direction of the line, a line that follows the cells, as the networks extracted from an elevation model, gives sections turned by 45 degrees back and forth: smooth it first. The sections must not cross each other: in the bends, they can reach at most the radius of the bend.

Instead of the interval, the sections can be placed at given river points, with their ids and Gauckler-Strickler coefficients (in the fields of the large wood modules). Bridges, given as points with their width in a field, add a section on the bridge and one just upstream and downstream of it. Sections created before by this module can also be given, to take their points from a new elevation model.

The three outputs describe the river for the hydraulic models: the section lines, with their id, progressive distance along the river and Gauckler-Strickler coefficient (30 if not given); the points of the sections, with their elevation; the points of the river between the sections, with their elevation.

Parameters

Extracts the cross sections of a river from an elevation model, along the line of the river: the input of the 1D hydraulic models, as SaintGeo and HEC-RAS.

Toolbox folder: Hydro-Geomorphology
Status: Experimental
Keywords: Sections, Raster, Vector, Hydraulic
Authors: Andrea Antonello, Silvia Franceschi
Class: org.hortonmachine.modules.RiverSectionsExtractor

Inputs

Parameter

Type

Unit

Default

Description

inElev

raster file

The elevation model.

inRiver

vector file

The line of the river, drawn from upstream along the bottom of its channel.

inRiverPoints

vector file

Optional points of the river where to place the sections, instead of at the interval.

inBridges

vector file

Optional points of the bridges, with a section on each and just upstream and downstream of it.

inSections

vector file

Optional sections created before by this module, to use instead of extracting them at the interval.

pSectionsIntervalDistance

double

m

10.0

The distance between the sections, along the river.

pSectionsWidth

double

m

10.0

The distance of the section ends from the river line, on each side: the section is twice as wide.

pBridgeBuffer

double

m

0

The distance within which a bridge point is considered on the river.

fBridgeWidth

String

The field of the width of the bridges.

Outputs

Parameter

Type

Unit

Description

outSections

output file

The section lines.

outSectionPoints

output file

The points of the sections, with their elevation.

outRiverPoints

output file

The points of the river between the sections, with their elevation.

Example

The example takes the main channel of the network of the sample area, from the reaches of Hack order 1 of the example of NetworkAttributesBuilder, smooths it and extracts a section every 50 m:

import org.hortonmachine.modules.LineSmootherMcMaster
import org.hortonmachine.modules.RiverSectionsExtractor
import org.hortonmachine.modules.VectorFilter

// the folder with the elevation model: change it to yours
var folder = "/data/flanginec/"

// the main channel of the basin: the reaches of Hack order 1 of NetworkAttributesBuilder
var filter = new VectorFilter()
filter.inVector = folder + "net_attributes.shp"
filter.pCql = "hack = 1"
filter.outVector = folder + "main_channel.shp"
filter.process()

// the network follows the cells in steps of 45 degrees: smooth it, so that the
// sections, perpendicular to the line, cross the valley
var smoother = new LineSmootherMcMaster()
smoother.inVector = folder + "main_channel.shp"
smoother.pLookahead = 41
// then simplified, so that also its ends follow the direction of the valley and not the cells
smoother.pSimplify = 20
smoother.outVector = folder + "main_channel_smooth.shp"
smoother.process()

// a section every 50 m along the channel, reaching 60 m on each side, its points taken on the elevation model
var extractor = new RiverSectionsExtractor()
extractor.inElev = folder + "dtm_flanginec.tif"
extractor.inRiver = folder + "main_channel_smooth.shp"
extractor.pSectionsIntervalDistance = 50
extractor.pSectionsWidth = 60
extractor.outSections = folder + "sections.shp"
extractor.outSectionPoints = folder + "section_points.shp"
extractor.outRiverPoints = folder + "river_points.shp"
extractor.process()
The sections, in red, across the main valley of the sample area, perpendicular to the smoothed channel, in blue.

The sections, in red, across the main valley of the sample area, perpendicular to the smoothed channel, in blue. In a few bends two sections touch at their ends: there they reach farther than the radius of the bend.

The valley is a steep mountain stream: the sections are fine for HEC-RAS, but not for SaintGeo, which needs a lowland river. Its page builds the sections of a synthetic river, with the same steps.