Create the geotransform (see geo_transform0()) from extent and dimension.

extent_dim_to_gt(x, dim)

Arguments

x

extent parameters, c(xmin,xmax,ymin,ymax)

dim

dimensions x,y of grid (ncol,nrow)

Value

6-element geo_transform0()

Details

The dimension is always ncol, nrow.

Examples

extent_dim_to_gt(c(0, 5, 0, 10), c(5, 10))
#> xmin xres yskew ymax xskew yres #> 0 1 0 10 0 -1