Clip2Coast {CCAMLRGIS} | R Documentation |
Clip Polygons to the Coast (removes polygon parts that fall on land) and computes the area of the resulting polygon. Uses an sf object as input which may be user-generated or created via buffered points (see create_Points), buffered lines (see create_Lines) or polygons (see create_Polys).
Clip2Coast(Input)
Input |
sf polygon(s) to be clipped. |
sf polygon carrying the same data as the Input
.
Coast, create_Points
, create_Lines
, create_Polys
,
create_PolyGrids
.
MyPolys=create_Polys(PolyData,Densify=TRUE,Buffer=c(10,-15,120))
plot(st_geometry(MyPolys),col='red')
plot(st_geometry(Coast[Coast$ID=='All',]),add=TRUE)
MyPolysClipped=Clip2Coast(MyPolys)
plot(st_geometry(MyPolysClipped),col='blue',add=TRUE)
#View(MyPolysClipped)