Skip to content

Commit

Permalink
correct logic in initGRASS
Browse files Browse the repository at this point in the history
  • Loading branch information
rsbivand committed Feb 27, 2022
1 parent 9c1f39f commit b525a8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/initGRASS.R
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ initGRASS <- function(gisBase, home, SG, gisDbase, addon_base, location,

assign("GV", gv, envir=.GRASS_CACHE)
pfile <- paste(loc_path, "PERMANENT", "DEFAULT_WIND", sep="/")
mSG <- FALSE
if (!file.exists(pfile)) {
lonlat <- FALSE
mSG <- !missing(SG)
Expand Down Expand Up @@ -315,7 +316,7 @@ initGRASS <- function(gisBase, home, SG, gisDbase, addon_base, location,
if (!file.exists(tfile)) file.copy(pfile, tfile, overwrite=TRUE)
tfile <- paste(loc_path, mapset, "WIND", sep="/")
if (!file.exists(tfile)) file.copy(pfile, tfile, overwrite=TRUE)
execGRASS("g.region", save="input")
execGRASS("g.region", save="input", flags="overwrite")
if (mSG) {
if (nzchar(wkt_SG)) {
tf <- tempfile()
Expand Down

0 comments on commit b525a8e

Please sign in to comment.