View source: R/clip_shapefile.R
clip_shapefile | R Documentation |
Clips an area from a larger shapefile provided in sf or sp formats.
clip_shapefile(
x,
limits,
proj.limits = 4326,
simplify = FALSE,
tol = 60,
return.boundary = FALSE,
extra.validate = FALSE
)
x |
Original shapefile to be clipped as a an sf or |
limits |
The constraining area used to clip |
proj.limits |
The |
simplify |
Should the |
tol |
Numerical tolerance value to be used for simplification. See |
return.boundary |
Logical. If |
extra.validate |
Logical indicating whether |
The function uses the st_intersection
function to clip smaller polygons from larger ones. The clip area is constrained by either a numeric vector or a spatial object in the limits
argument. Defining limits
by a sf
object gives greater freedom for the clip area as the area does not have to be rectangular.
Clipped spatial object. If return.boundary = TRUE
, a list containing the shapefile together with the clip boundary.
Mikko Vihtakari
Other create shapefiles:
geonorge_bathymetry()
,
raster_bathymetry()
,
vector_bathymetry()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.