Description Usage Arguments Details Value Author(s) Examples
helper function used to retrieve the extent of a spatial object or file with the associated proj4string
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | get_extent(object, abort = FALSE)
## Default S3 method:
get_extent(object, abort = FALSE)
## S3 method for class 'character'
get_extent(object, abort = FALSE)
## S3 method for class 'Raster'
get_extent(object, abort = FALSE)
## S3 method for class 'sf'
get_extent(object, abort = FALSE)
## S3 method for class 'sfc'
get_extent(object, abort = FALSE)
## S3 method for class 'Spatial'
get_extent(object, abort = FALSE)
|
object |
|
abort |
|
return an object of class sprawl_ext
with two slots:
$extent: numeric (4)
extent of the object (xmin, ymin, xmanx, ymax)
$projstring: character
proj4string of the object
object of class sprawl_ext
Lorenzo Busetto, phD (2017) lbusett@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
library(raster)
in_rast <- system.file("extdata", "sprawl_EVItest.tif", package = "sprawl.data")
get_extent(in_rast)
in_rast <- raster::raster(in_rast)
get_extent(in_rast)
in_vect <- system.file("extdata","lc_polys.shp", package = "sprawl.data")
get_extent(in_vect)
in_vect <- read_vect(in_vect)
get_extent(in_vect)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.