Return the world transform defining the raster's offset and resolution.

raster_to_world(x)

Arguments

x

raster object (the raster package, extends BasicRaster)

Value

a geotransform vector

Details

The world vector is the values xres, yres, xmin, ymax relative to the centre of the top left pixel. "yres" the y-spacing is traditionally negative.

Examples

raster_to_world(raster::raster(volcano))
#> xres yskew xskew yres xmin ymax #> 0.016393443 0.000000000 0.000000000 -0.011494253 0.008196721 0.994252874