[GRASS-SVN] r59105 - grass-addons/grass7/raster/r.mess
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Feb 20 04:00:42 PST 2014
Author: pvanbosgeo
Date: 2014-02-20 04:00:42 -0800 (Thu, 20 Feb 2014)
New Revision: 59105
Modified:
grass-addons/grass7/raster/r.mess/r.mess
Log:
small bugfix and workaround to deal with fact that column names of vector attribute tables created with v.db.addtable are converted to lower case
Modified: grass-addons/grass7/raster/r.mess/r.mess
===================================================================
--- grass-addons/grass7/raster/r.mess/r.mess 2014-02-20 10:19:13 UTC (rev 59104)
+++ grass-addons/grass7/raster/r.mess/r.mess 2014-02-20 12:00:42 UTC (rev 59105)
@@ -315,11 +315,12 @@
grassversion <- as.numeric(system("g.version | cut -c7", intern=T))
## Get vector with variables
-ipn <- Sys.getenv("arrIN") # variable names
+ipn <- Sys.getenv("arrIN") # variable names
ipn <- unlist(strsplit(ipn,";"))[-1]
-ipl <- Sys.getenv("INMAPS1") # old environmental layers
+ipn <- tolower(ipn) # avoid problems with vector column names
+ipl <- Sys.getenv("INMAPS1") # old environmental layers
ipl <- unlist(strsplit(ipl,","))
-ipl2 <- Sys.getenv("INMAPS2") # new environmental layers
+ipl2 <- Sys.getenv("INMAPS2") # new environmental layers
if(ipl2==""){
ipl2 <- ipl
}else{
@@ -433,7 +434,7 @@
# Reference distribution layer is vector
#-----------------------------------------------------------------------
- execGRASS("v.extract", flags="t", input=vtl, type="point", output=tmpMESS976543210)
+ execGRASS("v.extract", flags="t", input=vtl, type="point", output="tmpMESS976543210")
system(paste("v.db.addtable tmpMESS976543210 columns='", paste(ipn, " double precision", collapse=","), "'", sep=""))
# make compatible for both v6.4 and 7
More information about the grass-commit
mailing list