Cloud-native distribution of the USGS National Hydrography Dataset, High Resolution stream network (NHDFlowline), nationwide (50 states + DC + PR/VI + Pacific territories as bundled in the USGS national seamless GDB), plus NHDPlus High Resolution flowlines with the network value-added attributes. Three layers:
public-domain (US federal work).NHD_H_National_GDB.zip (national seamless High-Resolution GDB).MultiLineString), OGC:CRS84 (lon, lat). Reprojected from the source NAD83 (EPSG:4269).Each dataset ships three assets: GeoParquet (<name>.parquet), PMTiles (<name>.pmtiles), and hive-partitioned H3 hex (<name>/hex/h0=*/data_0.parquet).
Hex aggregation caveat. One hex row = one (flowline, h8) pair. Per-feature columns (
lengthkm,shape_length) are repeated on every cell a flowline covers — neverSUMthem on hex data. Network length ≈SUM(lengthkm)only afterSELECT DISTINCT permanent_identifier, lengthkm. The H3 index columns (h8,h0) are the only fields safe to aggregate directly.
The source-layer is the last segment of the dataset name (streams-by-order or perennial-streams), NOT the GDB layer name.
streams-by-order carries streamorder (Strahler stream order, integer) joined from the NHD
value-added attribute table NHDFlowlineVAA on permanent_identifier. Higher = larger
downstream river; headwater channels are order 1. streamlevel (the downstream-mainstem
hierarchy, counted down from the terminal outlet) is included as well.
⚠️ USGS populates streamorder for only a minority of NHD subbasins, and the gap is
GEOGRAPHIC, not topological. Only 3,355,035 of 30,221,659 flowlines (11.1%) carry a usable
order, while innetwork = 1 — the connected drainage network — covers 29,184,336 flowlines
(96.6%). So this is not "order is only computed for networked reaches": most networked reaches
have no order. It reflects NHD's per-subbasin refresh history:
streamorder and streamlevel coverage are uncorrelated — USGS populated one attribute or
the other per subbasin (HUC2 17 = 66.1% order / 6.4% level; HUC2 14 = 0.0% / 83.6%). They are
also not interchangeable: where both exist they agree on only 4.3% of rows (correlation −0.116).⛔ Consequence: streamorder cannot select a stream class over any area larger than a verified
subbasin. The predicate looks like an attribute filter and behaves as a geographic one — in
California it selects 94,505 km of 1,083,964 km of in-network flowline (8.7%), and 92,393 km of
that (97.8%) is HUC4 1801 alone. A "California streams by order" total computed this way is a
Klamath-basin total. Where order is computed it is not selective by feature type (in 1801 it
covers 87.3% of perennial, 86.1% of intermittent and 65.6% of ephemeral length), so the populated
subset is not "the real streams" either. Always run the per-HUC2 coverage query above first.
streamorder = 0 is a source sentinel meaning "not computed", not an order (1,234,262 rows).
The valid Strahler range is 1–10; a few thousand records carry out-of-range values up to 191.
Filter streamorder > 0, never IS NOT NULL — IS NOT NULL admits the sentinel and
certifies regions with nothing usable (HUC2 12 looks 96.7% covered and is 0.0% usable; HUC2 13
goes 17.5% → 0.0%).
For flow permanence, use perennial-streams (fcode = 46006) — it needs no VAA attribute and
is complete nationwide.
Usable stream order lives in nhdplus-hr/flowline (below) — NHDPlus High Resolution's
NHDPlusFlowlineVAA computes the network attributes properly, and it is published here for the 13
hydrologic units that intersect California with 100.00% coverage; the national fan-out is
data-workflows#205. Full measurement
of this gap: data-workflows#518.
perennial-streams is the subset where fcode = 46006. For reference, related stream FCODEs in the source:
Source: USGS NHD NHDFCode domain table.
nhdplus-hr/flowline)A third dataset in this bucket, added because base NHD-H cannot answer stream-order questions
(above). USGS NHDPlus HR computes the network value-added attributes properly: across all
266 source units nationwide — 238 at HU4 granularity plus 28 HU8 units in Alaska —
streamorde > 0 covers 100.00% of in-network, non-coastline flowline length in every single
unit, against base NHD's 11.4% nationally with 15 of 22 HUC2 regions at exactly 0.0%.
Source units are hydrologic units, and each is ingested whole; none is clipped to any state line. The collection is now national, so this applies to every region you might ask about, and an unmasked query returns a units total, never a state total.
California is the worked example, from the 13 HU4 units that intersect the state: 30.3% of their 1,175,296 km of in-network flowline lies outside California — in Nevada, Utah, Oregon and Arizona. Three units are mostly out of state:
Ingesting whole units is correct — a hydrologic unit is the natural unit of a stream network — but
it means a regional statistic has to be masked to that region first, on the hex asset, by
joining h8 and h0 against a boundary hex layer. Without the mask, out-of-region length is
counted as local: California order 1–2 (headwater) length is 924,634 km across those 13 units
and 641,393 km inside the state — a 44% overstatement. The same trap applies to every state
now that coverage is national, and it is larger for states whose units extend well beyond them.
The same holds for every future tranche: a set of hydrologic units is never a state extent.
These two are complementary — do not substitute one for the other. Base NHD-H is the denser,
more recently edited network: over the 13 California units it holds 289,426 km of ephemeral
channel that this NHDPlus HR vintage does not have (plus 24,336 km intermittent, 7,257 km perennial), because
NHD has since been densified with ephemeral washes. Conversely, for the 2,017,710 features shared
by both with the same fcode, NHDPlus HR lengthkm runs +1.9% (ephemeral), +4.8%
(intermittent), +5.5% (perennial) longer. That length divergence is a per-VPU editing-vintage
difference, not a different length algorithm — where the underlying NHD has not been re-edited
the two agree to the millimetre — so compare per unit using the vpu_vintage column rather than
applying a blanket offset. fcode itself is ~96% stable (81,782 of 2,017,710 shared features
reclassify, in both directions): there is no redefinition of ephemeral or perennial.
Sourced from the per-HU4 VPU/Current/GDB downloads, not the National Release 2 aggregate,
which USGS documents as defective (region 06 falls back to Beta data with a disconnected network;
a GridCode bug affects VPUIDs 0903/1007/1015/1021/1022/1025; 0415 is a pre-Beta prototype). Each
unit's source filename and vintage is recorded in the STAC collection description.
streamordeis NULL, never 0, wherever order is not computed (off-network reaches, coastline, canals/pipelines): the source's non-positive sentinels — including-9on divergent paths — are normalised to NULL at build time, so the published range is exactly 1-10. Audit coverage with> 0anyway; it is the correct predicate for the source and forstreams-by-order.
MapLibre source-layer for nhdplus-hr/flowline.pmtiles is flowline (zoom 0-10). Tiles drop
features on dense tiles by design — never compute quantities from them; use the GeoParquet or hex.
Per-unit provenance (each source filename, its publication vintage, and that unit's measured
coverage) is published as nhdplus-hr/flowline/units-manifest.csv — 266 rows.
| 1810 | Southern Mojave–Salton Sea | 49,931 | 46,906 | 6.1 |
| 1802 | Sacramento | 159,510 | 157,264 | 1.4 |
| 1803, 1804, 1805, 1806 | (entirely in CA) | 255,759 | 255,759 | 0.0 |
| TOTAL | 1,175,296 | 818,884 | 30.3 |