ddbs_crs {duckspatial} | R Documentation |
Check CRS of a table
Description
Check CRS of a table
Usage
ddbs_crs(conn, name, crs_column = "crs_duckspatial")
Arguments
conn |
a connection object to a DuckDB database |
name |
a character string of length one specifying the name of the table, or a character string of length two specifying the schema and table names. |
crs_column |
a character string of length one specifying the column
storing the CRS (created automatically by |
Value
CRS object
Examples
## load packages
library(duckdb)
library(duckspatial)
library(sf)
## database setup
conn <- dbConnect(duckdb())
ddbs_install(conn)
ddbs_load(conn)
## read data
countries_sf <- st_read(system.file("spatial/countries.geojson", package = "duckspatial"))
## store in duckdb
ddbs_write_vector(conn, countries_sf, "countries")
## check CRS
ddbs_crs(conn, "countries")
[Package duckspatial version 0.2.0 Index]