Open mdsumner opened 1 year ago
src <- "/vsicurl/https://gebco2023.s3.valeria.science/gebco_2023_land_cog.tif" library(terra) r <- rast(src) ext <- c(-2165880, 1768374, -1014018, 2262496) dm <- c(512, 512) proj <- "+proj=stere +lon_0=80.5196726901466 +lat_0=-67.7777429448851 +lat_ts=71 +datum=WGS84" t <- rast(ext(ext), ncols = dm[1], nrows= dm[1], crs = proj) project(r, t, by_util = T) range(vapour::vapour_warp_raster(src, dimension = dm, extent = ext, projection = proj)[[1]], na.rm = TRUE) #[1] 1 3730 range(vapour::gdal_raster_data(src, target_dim = dm, target_ext = ext, target_crs = proj)[[1]], na.rm = TRUE) #[1] -5614 3730