Open rsbivand opened 1 week ago
@rsbivand GDAL 3.7 was just released less than 1.5 years ago. Thus, my feeling is that it is too early to expect the majority of the users to have it...
OK, it does save a lot (~50%) on installed size. CRAN Windows and macOS are OK, current Fedora also, Ubuntu GH actions OK, CRAN Fedora devel checks not OK, because Fedora is still 36, so GDAL 3.4. CRAN macOS checks not OK 3.5 on both architectures. I'll see how to move CRAN forward, at least for feasible check platforms, with the benefit of smaller installed sizes for vector files.
GDAL37 <- as.numeric_version(unname(sf_extSoftVersion()["GDAL"])) >= "3.7.0"
file <- "aa.gpkg.zip"
zipfile <- system.file(file, package="aaa")
if (GDAL37) {
out <- st_read(zipfile)
} else {
td <- tempdir()
bn <- sub(".zip", "", basename(file))
target <- unzip(zipfile, files=bn, exdir=td)
out <- st_read(target)
}
@Nowosad I've been looking at reading compressed vector files, such as this: GB_election_2024_sim.gpkg.zip
In
terra
:In
sf
:Could we compress the GPKG in
spData
see https://github.com/Nowosad/spData/issues/62 ? Or are too many using GDAL < 3.7 ? This actually also works from GDAL >= 3.1 for ESRI Shapefiles too.