Skip to main content

h3-lowpoints

PyPI Tests Docs Software DOI Dataset DOI

Find closed depressions ("low points") in an elevation model and describe them on H3 hexagon cells at any resolution, ready for maps, 3D views and analysis.

Status: alpha (0.x). The method is tested against independent methods and on real terrain. A depression is a feature of the terrain model: this library does not say whether water collects there, and its output is not a flood map.

Documentation: ujjawal-01.github.io/h3-lowpoints (also in docs/), with getting started, concepts, outputs, the Python API, the command line, data sources, large regions, the map, verification, validation, susceptibility, example maps, accuracy and limits, a glossary and the roadmap.

What it does

  1. Fills the terrain the way water would, to find every place water cannot flow out of, with its depth, area, volume and lowest point.
  2. Maps every depressed pixel onto H3 cells: deepest depth, depressed area and volume, number of lowest points, and how much of each cell the data covers. Coarser resolutions are exact roll-ups, so one result serves every scale from a street to a continent.
  3. Scales to regions far larger than memory with an exact tiled method: the answer never depends on the tile size, and tables are written to disk as they are produced.
  4. Fetches open data for any box: USGS 3DEP (US, 30 m, 10 m and 1 m lidar), Copernicus GLO-30 (worldwide), land cover and design rainfall.
  5. Shows results as a self-contained, shareable 3D web map.
  6. Verifies any result, anywhere, with checks that need no reference answer.
  7. Validates against observations: do flood reports, claims or high-water marks fall in or near depressions more often than chance? Lift with block-bootstrap confidence intervals.
  8. Compares the runoff reaching each depression with what it holds: the rain that fills it, counting overflow from upstream, and how full NOAA Atlas 14 design storms leave it; and whether mapped streams, canals or roads drain it (susceptibility).

Install

Python 3.10 or newer:

pip install h3-lowpoints                          # core
pip install "h3-lowpoints[viz,sources,parquet]"   # + notebook maps, drain/building files, Parquet output

National dataset

Every closed depression on land in the lower 48 US states, from USGS 3DEP 30 m with open water masked: 10.6 million depressions and 34 million H3 resolution-10 cells, with each depression's catchment, spill link, levels, shape and fill curve, and (new in version 0.3) how easily each one fills: the rain that fills it, the NOAA Atlas 14 storm that does, and whether a mapped stream, canal or highway drains it, tested against flood reports in New York City and Houston. As Parquet, with a description of methods, columns and limits. Open data (CC BY 4.0) on Zenodo, version 0.3: doi.org/10.5281/zenodo.23731345 (version 0.2, without the susceptibility table: doi.org/10.5281/zenodo.23669497; version 0.1, without catchments and fill curves: doi.org/10.5281/zenodo.23552773).

Quick start

from h3lowpoints import analyze
from h3lowpoints.sources.usgs import fetch_3dep

fetch_3dep((-97.9, 30.1, -97.6, 30.4), "austin.tif")   # USGS 3DEP, 30 m bare earth
res = analyze("austin.tif", min_depth=0.5)              # H3 resolution chosen from the data: 10

res.depressions            # one row per depression: depth, area, volume, lowest point, ...
res.cells                  # one row per H3 cell: deepest depth, area, volume, counts, coverage
res.at_resolution(7)       # the same cells rolled up exactly to resolution 7
res.to_html("map.html")    # interactive 3D map, one file
res.save("results")        # depressions.csv, cells.csv, meta.json (or format="parquet")

The same from the command line:

h3lowpoints fetch-dem --from 3dep --bbox -97.9 30.1 -97.6 30.4 --out austin.tif
h3lowpoints analyze austin.tif --min-depth 0.5 --out results --map map.html
h3lowpoints verify results

A whole US region, straight from the 3DEP tiles, verified on completion:

h3lowpoints build --bbox -98 30 -96 32 --out region --min-depth 0.5 --cache-dir tiles --format parquet

What counts as a depression

The terrain is filled with the priority-flood algorithm; water leaves over the raster's edge and into nodata or masked areas. Fill level minus ground is the depth, and an 8-connected area of positive depth whose deepest point reaches min_depth (default 0.15 m) is one depression. The precise rules are in docs/definition.md.

Limits

  • Ponds, quarries, sinkholes and street sags are all depressions; the library does not know which hold water or cause problems, nor about drains the elevation data cannot see.
  • Results are only as good as the elevation data: keep min_depth above its vertical error, and prefer bare-earth data. Road embankments over culverts appear as dams.
  • Heights must be in metres.

The full list is in docs/limitations.md.

Project

To cite the library, use doi.org/10.5281/zenodo.23552522 (all versions) or the entry in CITATION.cff.

Contributing · Changelog · Citation

Code is Apache-2.0 (see LICENSE and NOTICE). No data is included; data fetched through the library keeps its own licence (USGS 3DEP, NLCD and NOAA Atlas 14 are public domain; Copernicus GLO-30 and ESA WorldCover require attribution). See docs/data-sources.md.

Metadata

Release files for h3-lowpoints 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for h3-lowpoints 0.5.1
File Size Uploaded Provenance Actions
h3_lowpoints-0.5.1.tar.gz 14.2 MB With provenance Details for h3_lowpoints-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for h3-lowpoints 0.5.1
File Interpreter ABI Platform Actions
h3_lowpoints-0.5.1-py3-none-any.whl Python 3 none any Details for h3_lowpoints-0.5.1-py3-none-any.whl

Total release size: 14.3 MB

Release files / h3_lowpoints-0.5.1.tar.gz

Download URL h3_lowpoints-0.5.1.tar.gz
Size 14.2 MB
Tags Source
SHA-256 checksum
How to use checksums
a40ffa9609cece6b39d6e79cc8de85fe1195c15029ee5e5e0a9cc40dba118803
BLAKE2b-256 checksum
How to use checksums
73e1b3449859af4c980a0f3fbffaf9b81d3db5c9d30624e4074873d0761a0b6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / h3_lowpoints-0.5.1-py3-none-any.whl

Download URL h3_lowpoints-0.5.1-py3-none-any.whl
Size 186.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8611a9f84e717ca25f75a6781d80c1ed3bb7b68369d8285ed3986f8c1e09aca
BLAKE2b-256 checksum
How to use checksums
24c3d4123f654d57c1c42163054941bd1e1371a3bc619eee84fafbb6dc491afc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for h3-lowpoints 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for h3_lowpoints-0.5.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page