Get contours from a bathymetric raster
get_contours.Rd
Get contours from a bathymetric raster
Arguments
- bathy_raster
SpatRaster object with the bathymetry data.
- surface
numeric. The surface elevation of the lake. Default is 0.
- depths
numeric. The depths at which to calculate the area. If a single numeric value is provided, the function will calculate the area at each depth from the surface to the minimum depth of the bathymetry raster at intervals of the provided value. If a vector of numeric values is provided, the function will calculate the area at each depth specified in the vector. Default is 1.
Examples
shoreline <- readRDS(system.file("extdata/rotoma_shoreline.rds",
package = "bathytools"))
point_data <- readRDS(system.file("extdata/depth_points.rds",
package = "bathytools"))
bathy_raster <- rasterise_bathy(shoreline = shoreline,
point_data = point_data, crs = 2193, res = 8)
#> Generating depth points... [2024-11-13 23:08:42]
#> Finished! [2024-11-13 23:08:43]
#> Interpolating to raster... [2024-11-13 23:08:43]
#> Adjusting depths >= 0 to -0.82 m
#> Finished! [2024-11-13 23:08:44]
contours <- get_contours(bathy_raster = bathy_raster)
#> Warning: Minimum depth not in depths. Adding minimum depth to contours.