[GRASS-SVN] r38281 - grass-addons/vector/v.autokrige
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jul 6 05:58:44 EDT 2009
Author: mathieug
Date: 2009-07-06 05:58:44 -0400 (Mon, 06 Jul 2009)
New Revision: 38281
Modified:
grass-addons/vector/v.autokrige/v.autokrige.py
Log:
corrected model selection
Modified: grass-addons/vector/v.autokrige/v.autokrige.py
===================================================================
--- grass-addons/vector/v.autokrige/v.autokrige.py 2009-07-06 09:51:11 UTC (rev 38280)
+++ grass-addons/vector/v.autokrige/v.autokrige.py 2009-07-06 09:58:44 UTC (rev 38281)
@@ -108,7 +108,7 @@
#%end
#%flag
#% key: l
-#% description: Log R output to v_autokrige.py.log
+#% description: Log R output to v.autokrige.py.log
#%end
import sys
@@ -157,10 +157,10 @@
else:
##conversion to R arguments in the expected format, starting from model1,model2...
##add c(" at the beginning and add ") at the end
- RargumentsDict['models'] = 'c(\\"' + models + '\\")'
+ modelsString = 'c(\\"' + models + '\\")'
##replace commas by \",\"
p = re.compile(',')
- modelsString = p.sub('\\",\\"',RargumentsDict['models'])
+ modelsString = p.sub('\\",\\"',modelsString)
return modelsString
def __writeRScript(self):
@@ -404,7 +404,7 @@
##ordinary kriging for now
predictors = '1'
autoKrigeCommand = 'R --vanilla --slave --args ' + self.input + ' ' + Rcolumnname + ' ' + \
- self.output + ' ' + str(cellsize) + ' "' + self.__prepareRModelsString() + '" ' + \
+ self.output + ' ' + str(cellsize) + ' "' + self.__prepareRModelsString(self.models) + '" ' + \
self.range + ' ' + self.nugget + ' ' + self.sill \
+ ' ' + self.nmax + ' ' + self.maxdist + ' ' \
+ writeVarRast + ' ' + predictors + ' < "' + self.RscriptFile + '"'
@@ -450,3 +450,4 @@
else:
print "R required, please install R first"
+
More information about the grass-commit
mailing list