I'd like to update records of a GeoPackage containing vector information in R. I've tried this:
library(sf) library(RSQLite) nc <- st_read(system.file("shape/nc.shp", package="sf")) # Write Geo Package gpkg <- "nc.gpkg" st_write(nc, gpkg) # Create connection con <- dbConnect(SQLite(), dbname = gpkg) # Update record res <- dbSendQuery(con, "UPDATE nc SET NAME = 'My new name' WHERE CNTY_ID == 1828")
Which gives me the following error:
Error: no such function: ST_IsEmpty
A bit of digging reveals that
ST_IsEmpty is one of several SQL functions that are required for updating a GeoPackage. How would I go about including these? Or are there any other methods of performing this operation?