st_as_sf {lazysf} | R Documentation |
Force computation of a GDAL query
Description
Convert lazysf to an in memory data frame or sf object
Usage
## S3 method for class 'tbl_SFSQLConnection'
st_as_sf(x, ...)
collect(x, ...)
Arguments
x |
output of |
... |
passed to |
Format
An object of class function
of length 1.
Details
collect()
retrieves data into a local table, preserving grouping and ordering.
st_as_sf()
retrieves data into a local sf data frame (will succeed only if there is a geometry column of class sfc
)
Value
a data frame from collect()
, sf data frame from st_as_sf()
(only if it contains an sfc
geometry column)
See Also
lazysf
Examples
f <- system.file("gpkg/nc.gpkg", package = "sf", mustWork = TRUE)
lsf <- lazysf(f) %>% dplyr::select(AREA, FIPS, geom) %>% dplyr::filter(AREA < 0.1)
st_as_sf(lsf)
[Package lazysf version 0.1.0 Index]