Learn R Programming

overtureR (version 0.2.5)

collect.overture_call: Convert dbplyr table to sf Object

Description

Collects a lazy dbplyr view and materializes it as an in-memory sf table. collect_sf is a deprecated alias.

Usage

# S3 method for overture_call
collect(x, ..., geom_col = "geometry", crs = 4326)

collect_sf(...)

Value

An 'sf' object with the dataset converted to spatial features.

Arguments

x

A lazy data frame backed by a database query.

...

Further arguments passed to dplyr::collect().

geom_col

The name of the geometry column. Will auto-detect names matching 'geom'.

crs

The coordinate reference system to use for the geometries, specified by its EPSG code. The default is 4326 (WGS 84).

Examples

Run this code
if (FALSE) { # interactive()

bbox <- c(xmin = -120.5, ymin = 35.5, xmax = -120.0, ymax = 36.0)
lazy_tbl <- open_curtain("building", bbox)
collect(lazy_tbl)
}

Run the code above in your browser using DataLab