1 · Setup
Observer position
Inundation polygon
Terrain (DSM)
Same code-paths as ar-prototype.html: GeoJSON parser, scenario filter, USGS 3DEP point query,
and DSM GeoTIFF loader (geotiff.js + proj4) are reused verbatim. The cross-section samples that DEM
bilinearly, exactly as the AR occluder does.
2 · Map — pick a tap point
Set observer + load a polygon, then click anywhere on the map to draw the transect from observer (yellow pin) to tap (cyan pin). Inundation polygons are drawn in blue.
3 · Profile
4 · Transect readout
Per-segment crossings (entries / exits of inundation)
| no transect yet |
5 · Sediment & conveyance diff
Load a design or pre-event bed profile (CSV of station, elevation) to diff it
against the current DSM bed along this transect. Stations are measured from the observer (station 0)
along the transect, same axis as the profile chart. Quantifies post-event aggradation / scour and the
resulting loss of flood conveyance at the modeled water surface.
One click: a synthetic design channel vs. a post-event aggraded bed, so you can see the conveyance-loss output without staging a site. Clearly labelled synthetic — not engineering data.
Reference bed profile
no reference profile loaded.
Conveyance at water surface
6 · Methods
algorithm + datums
1 · Transect parameterisation
Let observer $O = (\lambda_O, \phi_O)$ and tap $T = (\lambda_T, \phi_T)$ in WGS84 lat/lon.
The transect is the great-circle approximation by ENU planar projection (small enough at
a single dam-reach scale): we convert to local ENU centred on the observer using
$E = (\lambda - \lambda_O) R \cos\phi_O$, $N = (\phi - \phi_O) R$, with
$R = 6\,378\,137$ m (WGS84 equatorial radius, identical to ar-prototype.html).
$\;d_{\text{total}} = \sqrt{(E_T - E_O)^2 + (N_T - N_O)^2}$, $\quad N_{\text{samp}} = \lceil d_{\text{total}} / \Delta s \rceil + 1$
Sample points are $s_k = k \cdot \Delta s$ for $k = 0, \dots, N_{\text{samp}}-1$ (clamped at $d_{\text{total}}$), each unprojected back to $(\lambda_k, \phi_k)$ for the polygon test. Default $\Delta s = 1$ m matches typical 1-m DSM resolution.
2 · Ground elevation $z_g(s)$
For each sample, ground elevation comes from the cached DEM by bilinear interpolation
on the observer-centred ENU grid (same sampleDem(dem, E, N) the AR
per-vertex occluder uses):
$z_g = (1{-}a)(1{-}b) z_{i,j} + a(1{-}b) z_{i+1,j} + (1{-}a) b z_{i,j+1} + ab z_{i+1,j+1}$
where $i, j$ are the floor indices of $(E/\Delta + n/2,\ N/\Delta + n/2)$ and $a, b$ are the fractional offsets. If no DEM is loaded, $z_g$ degrades to the observer ground elevation everywhere — clearly flagged in the readout.
3 · Water-surface elevation $z_w(s)$
For each sample $k$, every active feature ring is tested with the same even-odd
ray-cast point-in-ring test as ar-prototype.html. First feature whose
ring contains the sample wins (matches the AR reticle's first-hit-wins policy). When
a sample falls inside feature $f$, WSEL is resolved in this preference order:
wsel_ft/WSEL_ft, orwsel_m/WSEL(m → ft)- Otherwise,
depth_ft+ observer ground (ft) — same fallback as the AR depth readout - If neither is present, the sample is treated as dry (no WSEL drawn)
WSEL does not interpolate between features: each sample takes the WSEL of whatever feature contains it. Where two features overlap (e.g., a 100-yr polygon nested inside a 500-yr polygon), the first hit in the GeoJSON feature order wins. Filter by storm and $\pm$ offset using the same controls as the AR viewer to keep this unambiguous.
4 · Depth $d(s)$
$d(s) = \max(0,\ z_w(s) - z_g(s))$. The chart fills the area between the ground and WSEL curves where this is positive. Samples with NaN ground or no containing feature are skipped for the depth fill but still drawn on the ground line.
5 · Datum handling (NAVD88)
USGS 3DEP returns NAVD88 metres. HEC-RAS / Hydrologic-models in the United States
almost always store WSEL in NAVD88 feet; FEMA effective FIRMs from before $\sim$2010
may still be NGVD29 ($\approx -0.3$ m offset in the southeast US). This tool does not
translate datums. If your polygon's wsel_ft is NGVD29 but the DEM is
NAVD88, depth will be biased by the local datum offset — verify by spot-checking a known
benchmark before relying on the profile for evacuation-route advice.
6 · Multiple ingress / egress
A transect can enter and exit the inundation polygon several times (e.g., a road that crosses a meander). The crossings table lists each entry/exit station and the depth at that station so the user can identify which crossings are passable on foot ($d < 0.15$ m, per FEMA pedestrian-flood guidance) versus impassable.
7 · Limitations
- No DSM → ground line is flat at observer elevation. The depth readout still works but it's only meaningful very close to the observer.
- 3DEP outside-coverage (e.g., outside CONUS+HI+AK) → grid build fails; load a DSM GeoTIFF instead.
- Planar ENU is accurate to $\lesssim 0.1$ m over a few km; for transects $>5$ km project explicitly first.
- Polygon overlap order matters. Pre-filter the GeoJSON to a single scenario via the storm slider so the first-hit ambiguity does not bias depth.
8 · Sediment & conveyance diff
A reference bed profile $z_{\text{ref}}(s)$ (design or pre-event) is linearly interpolated onto the transect station grid and compared with the current DSM bed $z_{\text{now}}(s)$. The cross-sectional bed-change area, equal to deposited / eroded volume per unit reach length, is the signed integral split into fill and scour parts:
$\;A_{\text{fill}} = \int \max(z_{\text{now}}-z_{\text{ref}},\,0)\,ds, \quad A_{\text{scour}} = \int \max(z_{\text{ref}}-z_{\text{now}},\,0)\,ds$
For a horizontal water surface at elevation $W$, the wetted area $A$ and wetted perimeter $P$ are accumulated panel-by-panel (partial panels split at the bed↔$W$ crossing; vertical water faces at the section ends are excluded from $P$). The single-section Manning conveyance is
Roughness is subdivided HEC-RAS-style: panels are split at user station→$n$ breakpoints, and each zone $i$ accumulates its own area $A_i$ and wetted perimeter $P_i$ (vertical interfaces between zones are not added to $P_i$). The section conveyance is the sum of zone conveyances,
$\;K = \sum_i \dfrac{1}{n_i}\,A_i\,R_i^{2/3}, \quad R_i = \dfrac{A_i}{P_i}, \qquad Q = K\,S^{1/2}$
(a single zone reduces exactly to $K = \tfrac{1}{n}AR^{2/3}$). At a fixed energy slope $S$ the discharge-capacity ratio is $Q_{\text{now}}/Q_{\text{ref}} = K_{\text{now}}/K_{\text{ref}}$, so the reported flood capacity lost is $1 - K_{\text{now}}/K_{\text{ref}}$ — note this ratio is independent of the absolute $n$ when the same roughness applies to both beds. SI form ($k_n=1$) is used internally; results are shown in both unit systems, and the stage–capacity rating curve evaluates the same $K$ across stages from thalweg to the lower bank top.
Screening scope. This is a single-section normal-conveyance estimate — it does not solve a water-surface profile (no critical-flow, contraction/expansion, or energy-loss routing), so it complements rather than replaces a calibrated HEC-RAS run. Reference stations must share the transect origin (station 0 = observer) and axis; mismatched units or origin produce a no-overlap warning.
9 · References
- USGS (2023). 3D Elevation Program (3DEP) — Elevation Point Query Service.
https://epqs.nationalmap.gov/v1/json - FEMA (2014). Guidance for Flood Risk Analysis and Mapping — Vertical Datum Conversion.
- NOAA (2022). VDatum 4.x — vertical-datum transformation tool. (manual NAVD88↔NGVD29 lookup if required)
- Chow, V.T. (1959). Open-Channel Hydraulics. McGraw-Hill — §6 conveyance & Manning's equation.
- USACE (2016). HEC-RAS River Analysis System, Hydraulic Reference Manual — conveyance subdivision.
Real USGS 3DEP terrain · real GeoJSON ingest · real WGS84→ENU math · no mocked data. Every library is self-hosted, so it runs offline once loaded. Companion to the AR Inundation Viewer.