Find samples deeper than the seafloor at their position
Source:R/depth.R
check_depth_vs_seafloor.RdFor every root sample (no parent) takes the deepest depth attributed to it —
its own depth_max_m/depth_min_m, its descendants' and its observations' —
and compares it with the deepest GEBCO cell in the 3x3 neighbourhood of its
position plus tolerance_m. Positions outside the raster are unknown, not
violations.
Usage
check_depth_vs_seafloor(
con,
seafloor,
sample_tbl = "sample",
obs_tbl = "obs",
tolerance_m = 10
)Arguments
- con
DBI connection holding
sample_tbl(withparent_sample_key,root_sample_key) and optionallyobs_tbl.- seafloor
Result of
sample_seafloor()(or a GEBCO tif path, in which case it is computed).- sample_tbl, obs_tbl
Table names;
obs_tblmay be absent.- tolerance_m
Metres a sample may exceed the neighbourhood-deepest cell before it is a finding (default 10).