[GRASS-SVN] r38418 - grass-addons/vector/v.krige
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jul 14 11:51:30 EDT 2009
Author: aghisla
Date: 2009-07-14 11:51:29 -0400 (Tue, 14 Jul 2009)
New Revision: 38418
Modified:
grass-addons/vector/v.krige/v.krige.py
Log:
command output bound - still incomplete command construction, stay tuned - if command output page is not named self.goutput, error in gouput.py, line 469
Modified: grass-addons/vector/v.krige/v.krige.py
===================================================================
--- grass-addons/vector/v.krige/v.krige.py 2009-07-14 14:48:06 UTC (rev 38417)
+++ grass-addons/vector/v.krige/v.krige.py 2009-07-14 15:51:29 UTC (rev 38418)
@@ -269,7 +269,8 @@
## Command output. From menuform module, cmdPanel class
self.goutput = goutput.GMConsole(parent=self, margin=False,
- pageid=self.RPackagesBook.GetPageCount())
+ pageid=self.RPackagesBook.GetPageCount(),
+ notebook = self.RPackagesBook)
self.goutputId = self.RPackagesBook.GetPageCount()
self.outpage = self.RPackagesBook.AddPage(self.goutput, text=_("Command output"))
@@ -355,18 +356,23 @@
# shift focus on Command output, if needed
if self.RPackagesBook.GetSelection() != self.goutputId:
self.RPackagesBook.SetSelection(self.goutputId)
- # see how to reuse menuform's code
-
- self.Controller.Run(input = self.InputDataMap.GetValue(),
- column = self.InputDataColumn.GetValue(),
- output = self.OutputMapName.GetValue(),
- overwrite = self.OverwriteCheckBox.IsChecked(),
- autofit = SelectedPanel.VariogramCheckBox.IsChecked(),
- package = self.RPackagesBook.GetPageText(self.RPackagesBook.GetSelection()),
- sill = SelectedPanel.SillCtrl.GetValue(),
- nugget = SelectedPanel.NuggetCtrl.GetValue(),
- range = SelectedPanel.RangeCtrl.GetValue(),
- logger = self.parent.log)
+ # mount command string as it would have been written on CLI
+ command = "v.krige.py" + " input=" + self.InputDataMap.GetValue()
+ # give it to the output console
+ self.goutput.RunCmd(command)
+ ## TEST - remove before flight
+ self.goutput.RunCmd(['g.region', '-p'], switchPage = True)
+ ## old function to port into command =
+ #self.Controller.Run(input = self.InputDataMap.GetValue(),
+ # column = self.InputDataColumn.GetValue(),
+ # output = self.OutputMapName.GetValue(),
+ # overwrite = self.OverwriteCheckBox.IsChecked(),
+ # autofit = SelectedPanel.VariogramCheckBox.IsChecked(),
+ # package = self.RPackagesBook.GetPageText(self.RPackagesBook.GetSelection()),
+ # sill = SelectedPanel.SillCtrl.GetValue(),
+ # nugget = SelectedPanel.NuggetCtrl.GetValue(),
+ # range = SelectedPanel.RangeCtrl.GetValue(),
+ # logger = self.parent.log)
class KrigingModule(wx.Frame):
""" Kriging module for GRASS GIS. Depends on R and its packages gstat and geoR. """
More information about the grass-commit
mailing list