# Browser seabed and lowered water

This layer extends the existing land meshes with public, NAVD88-referenced elevation models. It is browser-only: original terrain, buildings, printable meshes, print bundles and fabrication elevations are unchanged.

The supported water range is **−35 to +6 m NAVD88**. The lowest valid native source elevation inside this implemented area is **−33.042236 m**, in the Narrows at longitude −74.036034, latitude 40.597423. The lower limit is `floor(deepest − 1 m)`, giving room to expose the full mapped bottom. It is a coverage-dependent display limit, not the depth of the entire harbor. `water-range.js` is generated with the mesh, and shared scenes use the same range.

## Investigate first

`tools/inspect-seabed-sources.py` samples the **original NOAA 9307 raster files**, before additional raster acquisition. That existing 2017 “topobathymetric” source is not a complete seabed. The saved [rough preview](../../review/seabed/9307-rough-preview.png) and [coverage report](../../review/seabed/9307-coverage.json) show sparse shallow coverage and large offshore NoData areas. Water-only rectangles at an 80 m inspection spacing have valid coverage of 17.30% in Arthur Kill, 12.53% in Kill van Kull, 2.11% in the Narrows, 5.55% in Upper Bay and 1.20% in Lower Bay. These are transparent inspection rectangles, not official hydrographic region boundaries or native-resolution coverage estimates.

The source is NAVD88 / GEOID12B, US survey feet, EPSG:6360, with a 1 ft native grid. Its May–July 2017 acquisition and reference system were checked against [NOAA metadata](https://www.fisheries.noaa.gov/inport/item/64732/). Feet convert with exactly `1200/3937`; no tidal offset is applied. The original data remains the existing land terrain. Sparse underwater returns were not patched across the missing harbor.

## Sources actually used

| Source | Acquisition / edition | Resolution and vertical reference | Coverage in this addition |
| --- | --- | --- | --- |
| [NOAA CUDEM 8483](https://noaa-nos-coastal-lidar-pds.s3.amazonaws.com/dem/NCEI_ninth_Topobathy_2014_8483/ncei_nintharcsec_dem_m8483_met_forHumans.html) | Northern tile edition October 20, 2015; southern edition April 19, 2018. Mixed underlying surveys, not same-year measurements. | 1/9 arc-second grid, approximately 2.6 × 3.4 m here; embedded EPSG:5498 = NAD83 + NAVD88 metres. The 2018 southern bathymetry was initially gridded at about 10 m and resampled/smoothed. | 227,205 water-grid samples: Kill van Kull, Narrows, Upper/Lower Bays and most Arthur Kill. Four original GeoTIFFs; exact URLs and SHA-256 hashes in the manifest. |
| [USGS/NOAA CoNED 5040](https://www.fisheries.noaa.gov/inport/item/49467) | 2015 model compilation. Local `NJNY_bathy_10m` source-footprint dates are 1930–2013. | Published 1 m grid; **10 m underlying bathymetry** in the western Arthur area. EPSG:26918 NAD83 / UTM 18N, EPSG:5703 NAVD88 metres, local bathymetry GEOID12A. | 7,317 water-grid samples where CUDEM is absent west of about −74.25°. Two original raster windows. CUDEM has priority wherever valid. |

The source raster CRS, metadata datum, units and NoData are checked explicitly. NOAA/USGS already transformed constituent tidal depths to NAVD88 before distributing these combined models. This pipeline accepts verified NAVD88 only and rejects MLLW/MSL/MHW inputs; it never treats a chart depth as a NAVD88 elevation. The NOAA bathymetry viewer also identified newer MLLW surveys; they were recorded but not incorrectly inserted. [Investigation notes](../../review/seabed/source-investigation.md) list their dates, resolution, datum and coverage limitations.

The 2018 CUDEM regional report describes bathymetric sources from 1933–2017, including NOAA soundings and USACE channel surveys. Those regional dates cannot be assigned to an individual pixel. For the 2015 northern tiles, the current spatial-metadata package does not expose local per-pixel source dates. Models contain interpolation; a valid pixel is **not evidence of a measurement at that pixel**.

## Geometry and coverage

Local coordinates match the viewer: project horizontal coordinates to EPSG:6539, multiply feet by `1200/3937`, subtract metre origin `[292600,50500]`; scene XYZ is `[east,NAVD88 elevation,−north]`. There is no added depth offset.

The implemented rectangle is local east/north `[-17600,-17600,14400,9600]`. Bilinear source resampling feeds 40 m detail and an 80 m overview. The 220 tiles are 1,600 m wide. The overview contains 147,929 triangles; all detail tiles together contain 493,504 triangles. Geometry assets total approximately 12.15 MB before transport compression. Nearby detail loads under a fixed browser budget; only the overview is always resident once negative water is used.

Seabed polygons exclude the actual existing land mesh outlines, including the original North Shore 2 m coastline, the island overview and neighboring terrain. Outline segments are noded before polygonization so the differing terrain resolutions form closed land exclusions. Shore-only vertices inherit existing terrain-edge elevations; the runtime refreshes these when land detail changes. The join changes the boundary vertices and interpolates to unmodified seabed samples at the next grid vertices within the coastal cell. Elevation adjustments can be several metres where wharves, coastlines and survey dates disagree; the browser review measured a 5.783 m maximum additional adjustment when island detail changed. These coastal transition triangles are a visual join, not additional seabed measurements. Channels away from the coastal cell retain the source model, with no flat bottom added. Fine and overview tile borders share 40 m vertices and identical sampled heights. A native-resolution vertex preserves the deepest channel point instead of losing it during coarsening.

The [shore-join check](../../review/seabed/shore-join-validation.json) records the baked overview boundary adjustment relative to the original combined-model sample: median 1.025 m, 95th percentile 7.332 m, maximum 15.321 m. At the maximum, the existing land edge is +1.617 m while the sampled model is −13.704 m. These discrepancies are another reason not to infer exact coast-crossing elevations from the display.

NoData, non-finite samples and elevations outside a generous −150 to +300 m plausibility envelope are excluded, not clamped. Triangles with unsupported vertices or centers are omitted. Coverage-limit line segments identify the exploration boundary and any model gaps; they are not ground. After the western CoNED supplement, all **234,522 water-grid samples** in this rectangle have a model value. This establishes modeled coverage only. There are still unresolved **measurement and survey-date gaps**, especially along the candidate lower Newark Bay connection. Areas outside the rectangle have no seabed in this addition.

The minimum is computed from native-resolution underwater pixels inside the implemented rectangle and the actual source-selection mask, not from NoData or the coarse browser grid. An isolated cell over 10 m below its 3×3 neighborhood median is rejected as a spike. None was rejected in this build. The Narrows minimum has neighboring values −33.042 to −32.954 m. Native CoNED minima in its used western water coverage are −15.244 m and −17.198 m, confirming they do not lower the global minimum. [Native depth validation](../../review/seabed/native-depth-check.json) records coordinates, source, neighborhood values and native-window hashes.

## Interpretation

This is an exploratory elevation view. Moving a horizontal plane does not simulate drainage, trapped pools, tides, currents, erosion or historical coastlines. It does not establish a safe route across the harbor.

The model suggests a shallow route toward New Jersey port land in lower Newark Bay by about −3 m. Native CUDEM neighborhoods also contain that shallow feature, but its northern source tile has unresolved local survey provenance; the viewer's survey-footprint query there found very old records. **This is not a verified physical connection or a claimed connection elevation.** See the [candidate analysis](../../review/seabed/connection-note.md) and review views at −2 and −3 m. Dredging, fill, interpolation and changing survey dates can change the result.

## Reproduce and validate

Use Python 3.11+ and a separate virtual environment:

```sh
python -m pip install -r tools/requirements-seabed.txt
python tools/inspect-seabed-sources.py
python tools/prepare-seabed.py --acquire
# After acquisition, rebuild without network:
python tools/prepare-seabed.py
python -m unittest discover -s tests -p test_prepare_seabed.py
node --test tests/seabed-assets.test.mjs tests/seabed-loader.test.mjs tests/water-visuals.test.mjs tests/scene-state.test.mjs
```

The local helper also recognizes optional dependencies installed in `.backups/seabed-python`; this directory is not required in a normal Python environment. The private `.backups/seabed-source` cache contains original CUDEM tiles, original CoNED raster windows, aligned grids and metadata. Checked-in manifests record source and derived-window hashes. Cache invalidation tracks existing terrain mesh hashes. Assets are deterministic for the same input snapshot.

Python checks verify unit conversion, rejection of unconverted tidal references, NoData/outlier exclusion, missing-support geometry, land exclusions and all-source native minimum checks. Every detail triangle is checked against the land polygon: no significant overlap was found; the largest float-rounding sliver triangle is 0.0183 m². JavaScript asset checks verify buffer hashes, index bounds, winding, shared borders, memory budgets and the generated water range. The parent browser review also checks saved-state round trips, exaggeration, missing coverage, mobile and Print isolation.
