Repository Description
This repository contains the Python script used to retrieve river cross-sections from a Digital Terrain Model (DTM), as described in Franey et al. (2026). It also includes a database of 57,125 cross-sections that were extracted across Denmark using the presented methodology.
Python Script
The script Extract_xsec_from_DTM.py contains the functions required to extract a cross-section profile from digital elevation data at a specified location along a stream. An example dataset with three cross-section locations is provided to demonstrate the workflow. These example sites are located along the Værebro Stream.
All input data required to run the examples are included in the repository ( DEM_vaerebro.zip , vaerebro_branch.zip and calculation_points.zip ):
Cross-Section Database
The folder All_cross_sections contains all 57,125 cross-sections generated in the study. Each cross-section is stored as an individual text file.
A cross-section profile consists of a series of points defined by the coordinate pair (x, z), where:
- x represents the horizontal distance along the cross-section transect.
- z represents the elevation.
The coordinate x = 0 corresponds to the center of the cross-section. The corresponding geographic coordinates (x, y) of each cross-section center are provided in the file Cross_section_database.txt.
Three key points are identified within each cross-section file:
- Left bank point
- Minimum elevation point (channel bottom)
- Right bank point
Cross-Section Summary Table
The file Cross_section_database.txt provides a summary of the main characteristics of all 57,125 cross-sections, including:
- Cross-section identifier
- Geographic coordinates
- Width
- Cross-sectional area
- Depth
- Additional derived metrics