st_as_sf.Extent | R Documentation |
Extent to sf
## S3 method for class 'Extent'
st_as_sf(x, ...)
x |
raster Extent object |
... |
passed on to st_sf |
library(raster)
library(sf)
r1 <- raster(nrows=108, ncols=21, xmn=0, xmx=100)
r2 <- raster(nrows=108, ncols=21, xmn=50, xmx=150)
st2 <- rbind(st_as_sf(extent(r1)),
st_as_sf(extent(r2)))
plot(st2, border = 1:2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.