| vector_land | R Documentation |
Extracts the land area from a bathyRaster object produced
by raster_bathymetry and returns it as an
sf polygon layer suitable for use in the
shapefiles argument of basemap. Warning: processing
may take a long time if the bathymetry raster is large.
vector_land(bathy, drop.crumbs = NULL, remove.holes = NULL, smooth = FALSE)
bathy |
A |
drop.crumbs |
Single numeric value specifying a threshold (area in km2) for disconnected polygons which should be removed. Set to |
remove.holes |
Single numeric value specifying a threshold (area in km2) for holes which should be removed. Set to |
smooth |
Logical indicating whether the pixelated contours should be smoothed. Uses the smooth_ksmooth function. |
The drop.crumbs and remove.holes arguments can be used
to reduce the resulting file size. The smooth argument removes the
pixelated contours but increases file size and biases the polygon with
respect to the underlying raster.
Use vector_land() together with vector_bathymetry to
build a matched land + bathymetry pair from a single source raster (e.g.
GEBCO, ETOPO, IBCAO) — see the example.
An sf object containing the land polygons in
the same projection as bathy$raster.
Mikko Vihtakari
raster_bathymetry, vector_bathymetry
Other create shapefiles:
clip_shapefile(),
geonorge_bathymetry(),
raster_bathymetry(),
vector_bathymetry(),
wcs_bathymetry()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.