region2SpatialPolygon: creates polygon from raster extent

Description Usage Arguments Author(s) Examples

View source: R/region2SpatialPolygon.r

Description

creates polygon from raster extent

Usage

1
2
extent2SpatialPolygon(ext)
region2SpatialPolygon(region,v_area=region)

Arguments

ext

raster extent or vector of region limits (xmax, xmax, ymin, ymax)

region, v_area

region identifier as defined in the region_definitions file.

Author(s)

Robert K. Bauer

Examples

1
2
3
4
5
r <- regions("lion")
ext <- extent(c(r$xlim,r$ylim))
extent2SpatialPolygon(ext)

region2SpatialPolygon("lion")

Example output

Loading required package: maps
Loading required package: mapdata
Loading required package: raster
Loading required package: sp
Loading required package: extrafont
Registering fonts with R
class       : SpatialPolygons 
features    : 1 
extent      : 2.5, 9, 39, 44.5  (xmin, xmax, ymin, ymax)
coord. ref. : NA 
class       : SpatialPolygons 
features    : 1 
extent      : 2.5, 9, 39, 44.5  (xmin, xmax, ymin, ymax)
coord. ref. : NA 

oceanmap documentation built on March 23, 2020, 5:06 p.m.