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, 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.

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, as Parquet, with a description of methods, columns and limits. Open data (CC BY 4.0) on Zenodo: 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.2.0

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.2.0
File Size Uploaded Provenance Actions
h3_lowpoints-0.2.0.tar.gz 208.1 kB With provenance Details for h3_lowpoints-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 310.4 kB

Release files / h3_lowpoints-0.2.0.tar.gz

Download URL h3_lowpoints-0.2.0.tar.gz
Size 208.1 kB
Tags Source
SHA-256 checksum
How to use checksums
19e50eac8d892159ce511c6379f5b3747bf60381ba517548c48f53a587af3056
BLAKE2b-256 checksum
How to use checksums
c921ef69d07df514a015f38ea51eafe820acb214256120b0abeeb0b7b7bc9f40
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 Oct 26, 2026.

Transparency log

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

Download URL h3_lowpoints-0.2.0-py3-none-any.whl
Size 102.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ba7ef90708993f4059a26f4851d10872d83d732fd30d964104ff8a05efc594d
BLAKE2b-256 checksum
How to use checksums
0c1f40d6aa861476e0e41501dc82de31538bf86eae39e9e424f104725e06470c
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 Oct 26, 2026.

Transparency log

Security for h3-lowpoints 0.2.0

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.2.0.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 Oct 26, 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