Learn R Programming

stplanr (version 0.1.4)

bb2poly: Convert a bounding box to a SpatialPolygonsDataFrame

Description

Takes a bounding box as an input and outputs a box in the form of a polygon

Usage

bb2poly(bb)

Arguments

bb
the bounding box or spatial object that will be used to crop shp

Examples

Run this code
bb <- structure(c(-1.55080650299106, 53.8040984493515, -1.51186138683098,
53.828874094091), .Dim = c(2L, 2L), .Dimnames = list(c("coords.x1",
  "coords.x2"), c("min", "max")))
bb1 <- bb2poly(bb)
plot(bb1)

Run the code above in your browser using DataLab