warp.py: Title

View source: R/open.R

warp.pyR Documentation

Title

Description

Title

Usage

warp.py(
  fp,
  extent = c(-1e+05, 1e+05, -1e+05, 1e+05),
  dimension = c(100, 100),
  projection = "+proj=laea",
  resample = "nearest"
)

Arguments

fp

gdal data source name (file, url, VRT string, database connection string, etc)

extent

xmin,xmax,ymin,ymax

dimension

width,height in pixels

projection

projection string of output (interpreted by GDAL input reader)

Value

WarpedVRT dataset

Examples

warped <- warp.py(rgba_tif(), extent = c(-1e3, 1e3, -1e3, 1e3), dimension = c(256, 256),
              projection = sprintf("+proj=omerc +lon_0=%f +lat_0=%f +datum=WGS84",
                                                             -77.75791, 24.56158))
plot(warped)

longlat <- warp.py(rgba_tif(), extent =
                                1.2 * c(-1, 1, -1, 1) +
                               rep(c(-77.75791, 24.56158), each = 2L),
                              projection = "OGC:CRS84",
                              dimension = c(256, 256), resample = "cubic")
plot(longlat, asp = 1/cos(24.5*pi/180))
maps::map(add = TRUE, col = "firebrick", lwd = 4)

hypertidy/rasterio.py documentation built on April 16, 2022, 12:48 a.m.