From 25fd95ba72938549d8594e75457d395a7fafd672 Mon Sep 17 00:00:00 2001 From: Roger Bivand Date: Tue, 10 Sep 2024 10:33:11 +0200 Subject: [PATCH] permit GDAL < 3.7.0 by unzipping zipped gpkg --- man/bhicv.Rd | 2 +- man/mstree.Rd | 2 +- man/read.gwt2nb.Rd | 2 +- man/skater.Rd | 2 +- vignettes/subgraphs.Rmd | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/man/bhicv.Rd b/man/bhicv.Rd index f11cf100..16cde33e 100644 --- a/man/bhicv.Rd +++ b/man/bhicv.Rd @@ -31,7 +31,7 @@ if (GDAL37) { bh <- st_read(zipfile) } else { td <- tempdir() - bn <- sub(".zip", "", basename(file)) + bn <- sub(".zip", "", basename(file), fixed=TRUE) target <- unzip(zipfile, files=bn, exdir=td) bh <- st_read(target) } diff --git a/man/mstree.Rd b/man/mstree.Rd index 03bb929c..bc0b2815 100644 --- a/man/mstree.Rd +++ b/man/mstree.Rd @@ -52,7 +52,7 @@ if (GDAL37) { bh <- st_read(zipfile) } else { td <- tempdir() - bn <- sub(".zip", "", basename(file)) + bn <- sub(".zip", "", basename(file), fixed=TRUE) target <- unzip(zipfile, files=bn, exdir=td) bh <- st_read(target) } diff --git a/man/read.gwt2nb.Rd b/man/read.gwt2nb.Rd index 5ccfb959..0468e588 100644 --- a/man/read.gwt2nb.Rd +++ b/man/read.gwt2nb.Rd @@ -93,7 +93,7 @@ if (GDAL37) { cal <- st_read(zipfile) } else { td <- tempdir() - bn <- sub(".zip", "", basename(file)) + bn <- sub(".zip", "", basename(file), fixed=TRUE) target <- unzip(zipfile, files=bn, exdir=td) cal <- st_read(target) } diff --git a/man/skater.Rd b/man/skater.Rd index 00b1f38c..59b85494 100644 --- a/man/skater.Rd +++ b/man/skater.Rd @@ -79,7 +79,7 @@ if (GDAL37) { bh <- st_read(zipfile) } else { td <- tempdir() - bn <- sub(".zip", "", basename(file)) + bn <- sub(".zip", "", basename(file), fixed=TRUE) target <- unzip(zipfile, files=bn, exdir=td) bh <- st_read(target) } diff --git a/vignettes/subgraphs.Rmd b/vignettes/subgraphs.Rmd index cf0cbc5f..26014bea 100644 --- a/vignettes/subgraphs.Rmd +++ b/vignettes/subgraphs.Rmd @@ -59,7 +59,7 @@ if (GDAL37) { w50m <- st_read(zipfile) } else { td <- tempdir() - bn <- sub(".zip", "", basename(file)) + bn <- sub(".zip", "", basename(file), fixed=TRUE) target <- unzip(zipfile, files=bn, exdir=td) w50m <- st_read(target) } @@ -177,7 +177,7 @@ if (GDAL37) { sc50m <- st_read(zipfile) } else { td <- tempdir() - bn <- sub(".zip", "", basename(file)) + bn <- sub(".zip", "", basename(file), fixed=TRUE) target <- unzip(zipfile, files=bn, exdir=td) sc50m <- st_read(target) } @@ -375,7 +375,7 @@ if (GDAL37) { tokyo <- st_read(zipfile) } else { td <- tempdir() - bn <- sub(".zip", "", basename(file)) + bn <- sub(".zip", "", basename(file), fixed=TRUE) target <- unzip(zipfile, files=bn, exdir=td) tokyo <- st_read(target) }