read_ext | R Documentation |
Read vector shape data with optional extent filter.
read_ext(x, ext = NULL, ...)
x |
used as 'sf::st_read()“ dsn argument |
ext |
optional extent (as per raster package) |
... |
arguments passed to 'sf::st_read()' |
The extent coordinates must be in the same projection as the source, or the result could be wrong.
Uses the 'sf' package to pass the extent down to GDAL's ExecuteSQL as WKT, use anything with an extent that the 'raster' package understands.
sf object, see 'sf::st_read()'
## Not run: \donttest{ # read_ext("myshapefile", raster::extent(100, 120, -40, -30)) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.