returns a extent polygon representing maximum extent of input rasters

max_extent(x, ...)

Arguments

x

raster class object

...

additional raster class objects

Value

a SpatialPolygons sp class object

Note

Creates a maximum extent polygon of all specified rasters

Author

Jeffrey S. Evans <jeffrey_evans@tnc.org>

Examples

library(raster) r1 <- raster(extent(61.87125, 76.64458, 23.90153, 37.27042)) r2 <- raster(extent(67.66625, 81.56847, 20.38458, 35.67347)) r3 <- raster(extent(72.64792,84.38125,5.91125,28.13347 )) ( e <- max_extent(r1, r2, r3) )
#> class : SpatialPolygons #> features : 1 #> extent : 61.87125, 84.38125, 5.91125, 37.27042 (xmin, xmax, ymin, ymax) #> crs : NA
plot(e)
plot(as(extent(r1),"SpatialPolygons"),col="red",add=TRUE)
plot(as(extent(r2),"SpatialPolygons"),col="red",add=TRUE)
plot(as(extent(r3),"SpatialPolygons"),col="red",add=TRUE)