High-performance Python library for hydrological terrain analysis with parallel, tiled algorithms
Project description
Overflow
Warning: This software is currently in alpha status. While functional, it may contain bugs and undergo breaking changes. See the documentation for more details.
Overflow is a high-performance Python library for hydrological terrain analysis that specializes in processing massive Digital Elevation Models (DEMs) through parallel, tiled algorithms.
Overview
Overflow provides a complete toolchain for extracting hydrographic features from raw elevation data:
- Terrain Conditioning: Breach and fill depressions in DEMs
- Flow Routing: Calculate D8 flow direction with flat resolution and flow accumulation
- Feature Extraction: Extract stream networks, delineate basins, and compute flow lengths
Unlike traditional GIS tools that rely on virtual memory, Overflow uses sophisticated tiled algorithms with parallel processing to handle datasets of any size efficiently.
Key Features
- Highly Parallel: Every algorithm designed for parallel execution using Numba.
- Memory Efficient: Process DEMs larger than RAM through tiled algorithms with efficient I/O patterns.
- Scalable: Fixed number of passes over data regardless of size. Every operation is designed to scale from laptop-sized datasets to continental DEMs without requiring specialized hardware.
- Accurate: Maintains correctness across tile boundaries using graph-based approaches. The algorithms produce results that are equivalent to authoritative methods used throughout the hydrological community.
- Modern Algorithms: Implements state-of-the-art priority-flood filling, least-cost breaching, and flat resolution algorithms
Quick Start
Installation
# Create conda environment with system dependencies
conda create -n overflow python gdal -c conda-forge
conda activate overflow
# Install overflow from PyPI
pip install overflow-hydro
Basic Usage
Python API
import overflow
# Process a DEM through the complete pipeline
overflow.breach("input.tif", "breached.tif")
overflow.fill("breached.tif", "filled.tif")
overflow.flow_direction("filled.tif", "flowdir.tif")
overflow.accumulation("flowdir.tif", "flowacc.tif")
overflow.streams("flowacc.tif", "flowdir.tif", "streams/")
overflow.basins("flowdir.tif", "basins.tif")
Command Line Interface
# Run the complete pipeline
overflow pipeline \
--dem_file input.tif \
--output_dir ./results
# Or run individual steps
overflow breach input.tif breached.tif
overflow fill breached.tif filled.tif
overflow flow-direction filled.tif flowdir.tif
overflow accumulation flowdir.tif flowacc.tif
Docker
docker pull ghcr.io/fema-ffrd/overflow:latest
docker run -v $(pwd):/data ghcr.io/fema-ffrd/overflow:latest \
pipeline --dem_file /data/input.tif --output_dir /data/results
Documentation
For detailed documentation, algorithm descriptions, and API reference, visit:
https://fema-ffrd.github.io/overflow/
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- Documentation: https://fema-ffrd.github.io/overflow/
- Issues: GitHub Issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file overflow_hydro-0.3.1.tar.gz.
File metadata
- Download URL: overflow_hydro-0.3.1.tar.gz
- Upload date:
- Size: 99.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3a46ef6f9087416c0c3e863041738c39ae353a643e67e5935f166d94038341f
|
|
| MD5 |
82a461570c4d75b07152b555ccf5fa2b
|
|
| BLAKE2b-256 |
a7eb26cda696b154237bb122c07beffa2825a1f0529abdecdf5afda8eb932367
|
Provenance
The following attestation bundles were made for overflow_hydro-0.3.1.tar.gz:
Publisher:
pypi-publish.yml on fema-ffrd/overflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
overflow_hydro-0.3.1.tar.gz -
Subject digest:
e3a46ef6f9087416c0c3e863041738c39ae353a643e67e5935f166d94038341f - Sigstore transparency entry: 723552156
- Sigstore integration time:
-
Permalink:
fema-ffrd/overflow@6c6bc6be95401a01137036cbc945b68c51747a4d -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/fema-ffrd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@6c6bc6be95401a01137036cbc945b68c51747a4d -
Trigger Event:
push
-
Statement type:
File details
Details for the file overflow_hydro-0.3.1-py3-none-any.whl.
File metadata
- Download URL: overflow_hydro-0.3.1-py3-none-any.whl
- Upload date:
- Size: 121.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb721ef51da3a0bf843d77e950f447f71fd27af5c223a0b9e6a774707de4d881
|
|
| MD5 |
142c7d02360bddeb8a8a9ffdb04da460
|
|
| BLAKE2b-256 |
ffeaea96321dc08cbd17be7380086a55a0fd0ed947acf957310299757cd04c84
|
Provenance
The following attestation bundles were made for overflow_hydro-0.3.1-py3-none-any.whl:
Publisher:
pypi-publish.yml on fema-ffrd/overflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
overflow_hydro-0.3.1-py3-none-any.whl -
Subject digest:
fb721ef51da3a0bf843d77e950f447f71fd27af5c223a0b9e6a774707de4d881 - Sigstore transparency entry: 723552171
- Sigstore integration time:
-
Permalink:
fema-ffrd/overflow@6c6bc6be95401a01137036cbc945b68c51747a4d -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/fema-ffrd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@6c6bc6be95401a01137036cbc945b68c51747a4d -
Trigger Event:
push
-
Statement type: