vector_bathymetry: Create a polygon bathymetry from a raster bathymetry file

View source: R/vector_bathymetry.R

vector_bathymetryR Documentation

Create a polygon bathymetry from a raster bathymetry file

Description

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.

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.

Value

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

Author(s)

Mikko Vihtakari

See Also

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


ggOceanMaps documentation built on May 29, 2024, 5:36 a.m.