A depth_fun for make_prediction_grid() that reads the coarse
sebastes_bathy raster instead of calling ggOceanMaps::get_depth(). Each
point receives the depth of the cell it falls in. It is intended for
examples and tests only.
Value
Numeric vector of depths (m, positive down), one per point. NA on
land or outside the raster (0-45 degrees E, 61-83 degrees N).
Examples
data(sebastes)
eggan <- subset(sebastes, cruiseseries == "EggaN")
region <- make_survey_prediction_region(eggan, crs = 32633, concavity = 5)
grid <- make_prediction_grid(
region, resolution = 20, max_depth = 1000, depth_fun = sebastes_depth
)
range(grid$depth)
#> [1] 10 970