Learn R Programming

DEPONS2R (version 1.2.2)

make.clip.poly: Make clipping polygon from bbox

Description

Makes a polygon from a bounding box to use for clipping the coastline, or other SpatialPolygons objects

Usage

# S4 method for matrix
make.clip.poly(bbox, crs)

Value

SpatialPolygons object

Arguments

bbox

2x2 matrix

crs

CRS object defining the projection of the SpatialPolygons object to be clipped

See Also

bbox for creation of bbox matrix from DeponsRaster

Examples

Run this code
data(bathymetry)
bbox <- cbind("min"=c(549517, 6155000), "max"=c(636000, 6210000))
rownames(bbox) <- c("x", "y")
clip.poly <- make.clip.poly(bbox, crs(bathymetry))

Run the code above in your browser using DataLab