View source: R/prepInputsCOG.R
| prepInputsCOG | R Documentation |
An alternative fast-path inside prepInputs() for remote Cloud Optimized GeoTiffs.
When a URL points to a COG and the user has specified a spatial subsetting argument
(to, cropTo, or maskTo), this function reads only the spatial window of interest
via GDAL's /vsicurl/ virtual filesystem — no full-file download is needed.
The returned SpatRaster is passed back to prepInputs where the normal
postProcess step (mask, reproject, write) completes the pipeline.
This function is called automatically from inside prepInputs() when
getOption("reproducible.useCOG") is TRUE (the default). It can also be
called directly.
prepInputsCOG(url, verbose = getOption("reproducible.verbose", 1), ...)
url |
Character. An HTTP(S) URL pointing to a GeoTiff file. |
verbose |
Numeric or Logical. Verbosity level. |
... |
Passed through; expected to contain at least one of |
A SpatRaster windowed to the bounding box of the to/cropTo/maskTo
object (in the COG's own CRS), or the character string "NULL" if any
pre-condition fails (not HTTP, no spatial arg, network error, empty window, etc.).
prepInputs(), prepInputsWithTiles()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.