Clip2Coast {CCAMLRGIS}R Documentation

Clip Polygons to the Antarctic coastline

Description

Clip Polygons to the Coast (removes polygon parts that fall on land) and computes the area of the resulting polygon. Uses a SpatialPolygon 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).

Usage

Clip2Coast(Input)

Arguments

Input

Polygon(s) to be clipped.

Value

SpatialPolygon carrying the same data as the Input.

See Also

Coast, create_Points, create_Lines, create_Polys, create_PolyGrids.

Examples

#Example 1: Use Clip2Coast on a pre-generated polygon

MyPolys=create_Polys(PolyData,Densify=TRUE,Buffer=c(10,-15,120))
plot(MyPolys,col='red')
plot(Coast[Coast$ID=='All',],col='grey',add=TRUE)
MyPolysClipped=Clip2Coast(MyPolys)
plot(MyPolysClipped,col='blue',add=TRUE)
#View(MyPolysClipped)

#Example 2: Use Clip2Coast while creating a polygon, with Clip=TRUE in create_Polys().

MyPolysBefore=create_Polys(PolyData,Buffer=c(10,-15,120))
MyPolysAfter=create_Polys(PolyData,Buffer=c(10,-15,120),Clip=TRUE)
plot(MyPolysBefore,col='green')
plot(Coast[Coast$ID=='All',],add=TRUE)
plot(MyPolysAfter,col='red',add=TRUE)


[Package CCAMLRGIS version 3.0.7 Index]