Learn R Programming

duckspatial (version 0.9.0)

convert_to_sf: Converts from data frame to sf

Description

Converts a table that has been read from DuckDB into an sf object

Usage

convert_to_sf(data, crs, crs_column, x_geom)

Value

sf

Arguments

data

a tibble or data frame

crs

The coordinates reference system of the data. Specify if the data doesn't have a crs_column, and you know the CRS.

crs_column

a character string of length one specifying the column storing the CRS (created automatically by ddbs_write_vector). Set to NULL if absent.

x_geom

name of geometry