[GRASS-SVN] r67477 - grass-addons/grass7/raster/r.edm.eval

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 4 00:15:52 PST 2016


Author: pvanbosgeo
Date: 2016-01-04 00:15:52 -0800 (Mon, 04 Jan 2016)
New Revision: 67477

Modified:
   grass-addons/grass7/raster/r.edm.eval/r.edm.eval
Log:
r.edm.eval addon: updated to use rgrass7 instead of spgrass6

Modified: grass-addons/grass7/raster/r.edm.eval/r.edm.eval
===================================================================
--- grass-addons/grass7/raster/r.edm.eval/r.edm.eval	2016-01-03 23:13:28 UTC (rev 67476)
+++ grass-addons/grass7/raster/r.edm.eval/r.edm.eval	2016-01-04 08:15:52 UTC (rev 67477)
@@ -209,7 +209,7 @@
 cat > $1 << "EOF"
 
 options(echo = TRUE)
-library(spgrass6)
+library(rgrass7)
 library(reshape)
 library(caTools)
 
@@ -226,8 +226,7 @@
 }
 
 copy_rast.GRASS <- function(rast, remove.orig=FALSE){
-    require(spgrass6)
-    mpst <- gmeta6()$MAPSET
+    mpst <- gmeta()$MAPSET
     fft <- execGRASS("g.findfile", flags="quiet", element="cell", file=rast, mapset=mpst, Sys_ignore.stdout=TRUE)
     if(fft==0){
         rname <- rand.name()
@@ -239,9 +238,6 @@
     }
 }
 
-# Check grass version
-grassversion <- as.numeric(system("g.version | cut -c7", intern=T))
-
 ## Get vector with variables
 obsmap <- Sys.getenv("GIS_OPT_OBS")
 distmod <- Sys.getenv("GIS_OPT_MOD")
@@ -472,7 +468,7 @@
 g.message message='-----'
 g.message message=''
 
-##using R to create MESS layers
+#using R to create MESS layers
 R CMD BATCH --slave "$RGRASSSCRIPT" ${GIS_OPT_FSTATS}_log.txt;
 
 if  [ "$GIS_FLAG_L" -eq 0 ] ; then



More information about the grass-commit mailing list