I have a PostgreSQL / PostGIS table with 30 rows (only 3 are shown) and 3 columns as follows
(raster
is a PostGIS data type) - It's the EFSA CAPRI data set btw, if somebody's fimilar with it:
// Can I import the raster
data type from PostGIS into R with the help of the RPostgreSQL-package (see the code below) OR do I have to use the rgdal-package inevitably as described by @Jot eN?
require(RPostgreSQL)
drv <- dbDriver("PostgreSQL")
con <- dbConnect(drv, dbname = "")
dbGetquery(con, "SELECT rid, rast, filename FROM schema.capri")
Importing it without transformation and St_AsText(rast)
(which works for the geometry data type of PostGIS) don't work.