Overview of NLDI pygeoapi Processes
Overview
The NLDI provides several Python-based geoprocessing capabilities exposed through
an OGC API – Processes interface. These services are hosted by a pygeoapi
server and extend the NLDI beyond its core indexing and navigation features.
The processes include:
- Raindrop trace
- Split catchment delineation
- Cross section at a point
- Cross section between endpoints
All processes operate on NHDPlusV2 network and catchment data and rely on
supporting Python packages such as nldi-flowtools and nldi-xstool.
Role of pygeoapi
The NLDI uses pygeoapi, an open-source OGC API server, to provide access to
its geoprocessing algorithms. The pygeoapi server presents each tool as a
standalone OGC API – Processes endpoint.
These process endpoints:
- Are not cached
- Are executed dynamically on request
- Use NHDPlusV2 data, DEM sources, and hydrologic network topology
This contrasts with the core NLDI API, which relies heavily on pre‑indexed
network features and cached reference data.
Available Algorithms
The following Python-based algorithms support both core NLDI functionality
and the explicit pygeoapi process endpoints:
Raindrop Trace
Uses elevation data (DEM) to trace the path of steepest descent from a user-supplied
coordinate to the nearest valid flowline.
Split Catchment
Splits the local NHDPlus catchment polygon into upstream and downstream portions
based on a linear referencing position on a flowline.
Cross Section at a Point
Extracts a cross section at a single point along a flowline.
Cross Section Between Endpoints
Generates a cross section defined by two user-provided points.
All algorithms are available as standalone Python packages and as hosted pygeoapi services.
Relationship to Core NLDI API
Two core NLDI endpoints rely internally on these processes:
- hydrolocation — uses raindrop trace for point snapping
- basin — uses both raindrop trace and split catchment to construct accurate basins
The pygeoapi endpoints make these same functions available directly for
custom geoprocessing and analytic workflows.
Notes & TODOs
- TODO: Add links to final Python process endpoints after deployment.
- TODO: Add diagrams illustrating typical process I/O flows.
- TODO: Specify performance expectations and runtime characteristics once benchmarked.