Classify the samples whose seafloor_depth_m is NULL, by cause
Source: R/depth.R
check_seafloor_nulls.RdAfter add_sample_seafloor(), a NULL seafloor can mean four different
things, and only one of them is acceptable to ship silently. This returns one
row per cause with its count — no_coordinates (lon or lat NULL),
nan_coordinate, outside_source_tile (the position genuinely falls off the
GEBCO tile that was sampled) — and inside_tile_null, a position inside
the tile that still reads NULL, which can only be a regression in the
sampling itself. Gate on that one:
stopifnot(attr(x, "n_inside_null") == 0) (D29, 2026-08-31).
Usage
check_seafloor_nulls(
con,
source_bbox = c(-180, 0, -90, 90),
sample_tbl = "sample",
lon_col = "longitude",
lat_col = "latitude"
)Arguments
- con
DBI connection holding
sample_tblafteradd_sample_seafloor().- source_bbox
c(w, s, e, n)of the GEBCO source that was sampled — the full sub-ice tilec(-180, 0, -90, 90)by default.- sample_tbl, lon_col, lat_col
Table and columns to read.