You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In issue #1693, @etiennebr discusses two ways to connect to a database: gdal and sf "native". In his example, the second "native" solution generates the following warning/message:
#> Note: method with signature 'DBIObject#sf' chosen for function 'dbDataType',
#> target signature 'PqConnection#sf'.
#> "PqConnection#ANY" would also be valid
I am also getting a similar warning/message when appending data to a blank Geopackage.
# Create blank geopackage
blank_sf <- sf::st_sf(geometry = sf::st_sfc(crs = sf::st_crs(4326)))
sf::st_write(blank_sf, "my_gpkg.gpkg")
# Connect to Geopackage
con <- DBI::dbConnect(RSQLite::SQLite(), dbname = "my_gpkg.gpkg")
# Create new_data
data <- sf::st_sf(
geom = sf::st_as_sfc(
list(sf::st_polygon(list( cbind(c(0,1,1,0,0), c(0,0,1,1,0))))),
crs = sf::st_crs(4326)
)
)
# Append new data to Geopackage
sf::st_write(obj = data, dsn = con, driver = "GPKG", append = TRUE)
Note: method with signature ‘DBIObject#sf’ chosen for function ‘dbDataType’,
target signature ‘SQLiteConnection#sf’.
"SQLiteConnection#ANY" would also be valid
This message seems to only appear once. Repeating the operation doesn't generate it again unless the session is restarted. Is there any way to suppress this message?
Hi Andrew, thanks for reporting that issue. You are right, the note gets printed once per session. This notice comes from DBI, not sf. I don't plan to fix this short term, but for sure I'll keep it in mind when I touch that code again since you are not the only user that finds it confusing. 🙂
I'll close the issue, but if this notice creates issues that I've overlooked, please reopen this issue.
In issue #1693, @etiennebr discusses two ways to connect to a database: gdal and sf "native". In his example, the second "native" solution generates the following warning/message:
I am also getting a similar warning/message when appending data to a blank Geopackage.
This message seems to only appear once. Repeating the operation doesn't generate it again unless the session is restarted. Is there any way to suppress this message?
My namespace:
The text was updated successfully, but these errors were encountered: