Skip to contents

Vectorizes bathymetry rasters. Designed to be used for the output of raster_bathymetry function. Warning: processing may take a long time if the bathymetry raster is large.

Usage

vector_bathymetry(
  bathy,
  drop.crumbs = NULL,
  remove.holes = NULL,
  smooth = FALSE
)

Arguments

bathy

bathyRaster object from the raster_bathymetry function.

drop.crumbs

Single numeric value specifying a threshold (area in km2) for disconnected polygons which should be removed. Set to NULL to bypass the removal. Uses the drop_crumbs function.

remove.holes

Single numeric value specifying a threshold (area in km2) for holes which should be removed. Set to NULL to bypass the removal. Uses the fill_holes function. Currently VERY slow.

smooth

Logical indicating whether the pixelated contours should be smoothed. Uses the smooth_ksmooth function.

Value

An sf object containing the depth polygons. Uses same projection than bathy (see CRS).

Details

The drop.crumbs and remove.holes arguments can be used to make the resulting object smaller in file size. The smooth argument can be used to remove the pixelated contours, but often increases file size. Note also that using this option will bias the contours with respect to real world.

See also

Other create shapefiles: clip_shapefile(), geonorge_bathymetry(), raster_bathymetry()

Author

Mikko Vihtakari