| gt_from_dim_bbox | R Documentation |
gt_from_dim_bbox() computes geotransform coefficients from raster
dimensions and a bounding box. The resulting geotransform will always be
north-up (no rotation).
gt_from_dim_bbox(dm, bbox)
dm |
Integer vector of length two containing the raster dimensions (xsize, ysize) in pixels. |
bbox |
Numeric vector of length four containing the bounding box (xmin, ymin, xmax, ymax) in georeferenced coordinates. |
Numeric vector of length six containing the geotransform coefficients.
GDALRaster$getGeoTransform(),
GDALRaster$setGeoTransform(),
GDALRaster$setBbox(), bbox_from_dim_gt(),
inv_geotransform()
# 1-degree global grid
(gt <- gt_from_dim_bbox(c(360, 180), c(-180, -90, 180, 90)))
# verify round-trip
bbox_from_dim_gt(c(360, 180), gt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.