Skip to main content

h3-lowpoints

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: docs/index.md, with getting started, concepts, outputs, the Python API, the command line, data sources, large regions, the map, verification, 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.

Install

Not on PyPI yet. From a clone (Python 3.10 or newer):

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

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

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.1.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.1.0
File Size Uploaded Provenance Actions
h3_lowpoints-0.1.0.tar.gz 184.9 kB With provenance Details for h3_lowpoints-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 276.8 kB

Release files / h3_lowpoints-0.1.0.tar.gz

Download URL h3_lowpoints-0.1.0.tar.gz
Size 184.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5c83d9b9b4f653fc06af8354044cbde183968ef057b2ad4149c8bbe730f710c2
BLAKE2b-256 checksum
How to use checksums
6608595516aa96e4cb4ef05417955c91632adbd656d0d304415083311d13582f
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 22, 2026.

Transparency log

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

Download URL h3_lowpoints-0.1.0-py3-none-any.whl
Size 91.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07bea771ae42ca5fba5f3cbbda9634b2237b0bc90927757f447c1c8a67ad357c
BLAKE2b-256 checksum
How to use checksums
2a6429b688f7176ec08a2811b9be99f06e96862c763474c7cc45bdbad69528bc
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 22, 2026.

Transparency log

Security for h3-lowpoints 0.1.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.1.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 22, 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