Skip to content

Commit

Permalink
read_VECT(): add support for SpatVectorProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
florisvdh committed Jun 16, 2024
1 parent 7991839 commit 4aa9be3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/vect_link_ng.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) 2022 Roger S. Bivand
#
read_VECT <- function(
vname, layer, use_gdal_grass_driver = TRUE, type = NULL,
vname, layer, proxy = FALSE, use_gdal_grass_driver = TRUE, type = NULL,
flags = "overwrite", ignore.stderr = get.ignore.stderrOption()) {
if (!(requireNamespace("terra", quietly = TRUE))) {
stop("terra required for SpatVector output")
Expand Down Expand Up @@ -53,7 +53,7 @@ read_VECT <- function(
}
# message("Reading ", tf, " (layer ", layer, ")")
suppressMessages({
res <- getMethod("vect", "character")(tf, layer)
res <- getMethod("vect", "character")(tf, layer, proxy = proxy)
})
} else {
if (missing(layer)) layer <- "1"
Expand All @@ -64,7 +64,7 @@ read_VECT <- function(
format = "GPKG", ignore.stderr = ignore.stderr
)
# message("Reading ", tf)
res <- getMethod("vect", "character")(tf)
res <- getMethod("vect", "character")(tf, proxy = proxy)
}
if (!all(getMethod("is.valid", "SpatVector")(res))) {
res <- getMethod("makeValid", "SpatVector")(res)
Expand Down

0 comments on commit 4aa9be3

Please sign in to comment.