extent2poly: Convert an extent object into a polygon

Description Usage Arguments Value See Also Examples

Description

Convert an extent object into a SpatialPolygons object. The coordinate reference is not recorded in the extent object so must aso be provided

Usage

1
extent2poly(extent, proj4string)

Arguments

extent

An extent object.

proj4string

A valid coordinate reference (passed to the proj4string argument in SpatialPolygons)

Value

A rectangular SpatialPolygons object matching extent.

See Also

extent, SpatialPolygons

Examples

1
2
3
ext <- extent(c(0, 10, 0, 5))
poly <- extent2poly(ext, wgs84())
plot(poly)

SEEG-Oxford/seegSDM documentation built on May 9, 2019, 11:08 a.m.