Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Merge branch 'master' of https://github.com/r-spatial/link2GI

# Conflicts:
#	docs/articles/link2GI1.html
#	docs/articles/link2GI2.html
#	docs/articles/link2GI3.html
#	docs/articles/link2GI4.html
#	docs/articles/link2GI5.html
#	docs/articles/link2GI6.html
#	docs/articles/link2GI7.html
#	docs/pkgdown.yml
  • Loading branch information
gisma committed May 17, 2024
2 parents 26df9e9 + fb35822 commit 74f0872
Show file tree
Hide file tree
Showing 76 changed files with 28 additions and 11,679 deletions.
4 changes: 3 additions & 1 deletion R/gdalControls.R
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ findGDAL <- function(searchLocation = "default",

if (Sys.info()["sysname"] == "Windows") {
if (searchLocation=="default") searchLocation <- "C:/"
if (grepl(paste0(LETTERS, ":", collapse="|"), searchLocation))
else searchLocation = normalizePath(searchLocation)
if (grepl(paste0(LETTERS, ":", collapse="|"), substr(toupper(searchLocation),start = 1,stop = 2)))

link = link2GI::searchGDALW(DL = searchLocation,
quiet=TRUE)
else stop("You are running Windows - Please choose a suitable searchLocation argument that MUST include a Windows drive letter and colon" )
Expand Down
10 changes: 7 additions & 3 deletions R/grassControl.R
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,14 @@ findGRASS <- function(searchLocation = "default",
quiet=TRUE) {

if (Sys.info()["sysname"] == "Windows") {
message("PLEASE NOTE: if you use GRASS version > 7.8 and/or the OSGeo4W installation you must:\n 1) start the OSGeo4W shell\n 2) start grassxx --gtext\n 3) start Rstudio\n Then both link2GI and rgrass should work.")
invisible(readline(prompt="Press [enter] to continue"))
if (!grepl(x = system("o-help",intern =T),pattern = "OSGeo4W Shell Commands", fixed = TRUE)[1]){
message("PLEASE NOTE: if you use GRASS version > 7.8 and/or the OSGeo4W installation you must:\n 1) start the OSGeo4W shell\n 2) start grassxx --gtext\n 3) start Rstudio from command line in the shell\n Then both link2GI and rgrass should work.")
invisible(readkey())
}
if (searchLocation=="default") searchLocation <- "C:/"
if (grepl(paste0(LETTERS, ":", collapse="|"), searchLocation) )
else searchLocation = normalizePath(searchLocation)
if (grepl(paste0(LETTERS, ":", collapse="|"), substr(toupper(searchLocation),start = 1,stop = 2)))

link = link2GI::searchGRASSW(DL = searchLocation)
else return(cat("You are running Windows - Please choose a suitable searchLocation argument that MUST include a Windows drive letter and colon"))
} else {
Expand Down
5 changes: 5 additions & 0 deletions R/link2giKarim.R
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,8 @@ reverse_bf_wpath = function(path){
path = utils::shortPathName(path)
return(path)
}
readkey <- function()
{
cat("[press [ESC] to continue]")
line <- readline()
}
1 change: 0 additions & 1 deletion R/linkGRASS.R
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ linkGRASS = function(x = NULL,
returnPaths = TRUE
rgrass::initGRASS(gisBase = grass$gisbase_GRASS,
home = home,
use_g.dirseps.exe = FALSE,
gisDbase = gisdbase,
mapset = "PERMANENT",
location = location,
Expand Down
3 changes: 2 additions & 1 deletion R/otbControls.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ findOTB <- function(searchLocation = "default",

if (Sys.info()["sysname"] == "Windows") {
if (searchLocation=="default") searchLocation <- "C:/"
if (grepl(paste0(LETTERS, ":", collapse="|"), searchLocation))
else searchLocation = normalizePath(searchLocation)
if (grepl(paste0(LETTERS, ":", collapse="|"), substr(toupper(searchLocation),start = 1,stop = 2)))
link = link2GI::searchOTBW(DL = searchLocation,
quiet=TRUE)
else stop("You are running Windows - Please choose a suitable searchLocation argument that MUST include a Windows drive letter and colon" )
Expand Down
4 changes: 3 additions & 1 deletion R/sagaControl.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ findSAGA <- function(searchLocation = "default",

if (Sys.info()["sysname"] == "Windows") {
if (searchLocation=="default") searchLocation <- "C:/"
if (grepl(paste0(LETTERS, ":", collapse="|"), searchLocation))
else searchLocation = normalizePath(searchLocation)
if (grepl(paste0(LETTERS, ":", collapse="|"), substr(toupper(searchLocation),start = 1,stop = 2)))

link = link2GI::searchSAGAW(DL = searchLocation,quiet = quiet)
else stop("You are running Windows - Please choose a suitable searchLocation argument that MUST include a Windows drive letter and colon" )
} else {
Expand Down
133 changes: 0 additions & 133 deletions docs/404.html

This file was deleted.

Loading

0 comments on commit 74f0872

Please sign in to comment.