Skip to content

Commit

Permalink
gpkg_read: use internal geopackage constructor to avoid error with pr…
Browse files Browse the repository at this point in the history
…e-existing GPKG
  • Loading branch information
brownag committed Mar 3, 2024
1 parent 37029a1 commit 336e9bc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions R/gpkg-io.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@ gpkg_read <- function(x, connect = FALSE, quiet = TRUE) {

res2 <- do.call('c', lapply(res, function(x) x$tables))
names(res2) <- do.call('c', lapply(res, function(x) names(x$tables)))
g <- geopackage(res2, dsn = x)
if (connect) {
gpkg_connect(g)
}
g

obj <- .geopackage(dsn = x, connect = connect)
obj$tables <- x
obj
}

#' Write data to a GeoPackage
Expand Down

0 comments on commit 336e9bc

Please sign in to comment.