Skip to content

Commit

Permalink
Merge pull request #71 from CYglume/fix_getrowGDALVer
Browse files Browse the repository at this point in the history
modify getrowGDALVer() to find latest GDAL
  • Loading branch information
gisma authored Nov 25, 2024
2 parents 6a5af05 + 52bdf92 commit 257e904
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions R/gdalControls.R
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,11 @@ getrowGDALVer <- function(paths) {
if (substr(ret, 1, 4) == "GDAL" && length(ret) > 0) {
tmp <- strsplit(x = ret, split = "GDAL ")[[1]][2]
tmp2 <- strsplit(x = tmp, split = ", released ")[[1]][1]
highestVer <- max(tmp2, highestVer)
if (tmp2 > highestVer ){
highestVer <- tmp2
pathI <- I
}
}
pathI <- i
}
options(show.error.messages = TRUE)
options(warn = 0)
Expand All @@ -339,4 +341,4 @@ getrowGDALVer <- function(paths) {
# getGDALVer<- function (paths){ sep = ifelse(Sys.info()['sysname']=='Windows', '\\', '/') scmd =
# ifelse(Sys.info()['sysname']=='Windows', 'gdalinfo.exe', 'gdalinfo') tmp<- strsplit(x =
# system(paste0(paste0(shQuote(paths$binDir[i]),sep,scmd),' --version'),intern = TRUE),split = 'GDAL ')[[1]][2]
# gdalVersion<- strsplit(x = tmp,split = ', released ')[[1]][1] return (gdalVersion) }
# gdalVersion<- strsplit(x = tmp,split = ', released ')[[1]][1] return (gdalVersion) }

0 comments on commit 257e904

Please sign in to comment.