bbox_transform | R Documentation |
bbox_transform()
is a convenience function for:
bbox_to_wkt(bbox) |> g_transform(srs_from, srs_to) |> bbox_from_wkt()
bbox_transform(bbox, srs_from, srs_to)
bbox |
Numeric vector of length four containing a bounding box (xmin, ymin, xmax, ymax) to transform. |
srs_from |
Character string in OGC WKT format specifying the
spatial reference system for |
srs_to |
Character string in OGC WKT format specifying the target spatial reference system. |
Numeric vector of length four containing a transformed bounding box (xmin, ymin, xmax, ymax).
g_transform()
, bbox_from_wkt()
, bbox_to_wkt()
elev_file <- system.file("extdata/storml_elev.tif", package="gdalraster")
ds <- new(GDALRaster, elev_file)
ds$bbox()
bbox_transform(ds$bbox(), ds$getProjection(), epsg_to_wkt(4326))
ds$close()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.