Return the RasterIO window vector defining the raster's offset and resolution and dimensions.

raster_to_rasterio(x)

raster_to_sfio(x)

Arguments

x

a raster object (BasicRaster, from raster package)

Value

RasterIO window vector 'c(x0, y0, nx0, ny0, nx, y)' see Details

Details

The RasterIO window is a six element vector of offset (x,y), dimension of source (nx0, ny0) and dimension of output (nx, ny).

The sf RasterIO is the RasterIO window in a list format used by the sf package, it contains the same information, and is created by raster_to_sfio().

Examples

raster_to_rasterio(raster::raster(volcano))
#> offset_x offset_y source_nx source_ny out_nx out_ny #> 0 0 61 87 61 87 #> attr(,"resample") #> [1] "NearestNeighbour"