I am looking for a way to read spatial data from MariaDB into R.
Connecting to the database was straightforward using DB::dbConnect
and RmariaDB::MariaDB
. I can load the data-layer to using dplyr::collect
, but it doesn't recognise the geometry column. This is a raw / blob column and I am not sure how to convert that into something that can be read into R with the sf-package.
I've seen people using sf::st_read
directly to read in the data. When I try that, I get the error: "object 'sfc' not found
".
Can anyone point me into the right direction to read in spatial data?