Hi,
Is it possible to write sf objects to spatialite databases? I tried to
adapt the postgis example of the st_write_db function but I get the
following error:
Error in sqliteSendQuery(con, statement, bind.data) :
error in statement: no such function: AddGeometryColumn
Cheers,
Lo?c
library(sf)
library(sp)
library(RSQLite)
data(meuse)
sf = st_as_sf(meuse, coords = c("x", "y"), crs = 28992)
# I created the db with QGIS, I don't know how to do otherwise
con <- dbConnect(RSQLite::SQLite(), '~/sandbox/db.sqlite')
st_write_db(con, sf, "meuse_tbl", dropTable = FALSE)