arc_raster | R Documentation |
Given an ImageServer
export an image as a terra SpatRaster
object.
See terra::rast
.
arc_raster(
x,
xmin,
xmax,
ymin,
ymax,
bbox_crs = NULL,
crs = sf::st_crs(x),
width = NULL,
height = NULL,
format = "tiff",
...,
raster_fn = NULL,
token = arc_token()
)
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 |
... |
additional key value pairs to be passed to |
raster_fn |
a scalar string with the name of the service raster function. See |
token |
default |
An object of class SpatRaster
.
## Not run:
img_url <- "https://landsat2.arcgis.com/arcgis/rest/services/Landsat/MS/ImageServer"
landsat <- arc_open(img_url)
arc_raster(
landsat,
xmin = -71,
xmax = -67,
ymin = 43,
ymax = 47.5,
bbox_crs = 4326,
width = 100,
height = 100
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.