arc_raster {arcgislayers} | R Documentation |
Read from an Image Server
Description
Given an ImageServer
export an image as a terra SpatRaster
object.
See terra::rast
.
Usage
arc_raster(
x,
xmin,
xmax,
ymin,
ymax,
bbox_crs = NULL,
crs = sf::st_crs(x),
width = NULL,
height = NULL,
format = "tiff",
token = arc_token()
)
Arguments
x |
an |
xmin |
the minimum bounding longitude value. |
xmax |
the maximum bounding longitude value. |
ymin |
that minimum bounding latitude value. |
ymax |
the maximum bounding latitude value. |
bbox_crs |
the CRS of the values passed to |
crs |
the CRS of the resultant raster image and the provided bounding box defined by |
width |
default |
height |
default |
format |
default |
token |
default |
Details
Value
An object of class SpatRaster
.
Examples
## Not run:
img_url <- "https://landsat2.arcgis.com/arcgis/rest/services/Landsat/MS/ImageServer"
landsat <- arc_open(img_url)
arc_raster(
landsat,
xmin = -71,
ymin = 43,
xmax = -67,
ymax = 47.5,
bbox_crs = 4326,
width = 100,
height = 100
)
## End(Not run)