[GRASS-SVN] r38392 - grass-addons/vector/v.krige
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jul 13 09:18:03 EDT 2009
Author: aghisla
Date: 2009-07-13 09:18:02 -0400 (Mon, 13 Jul 2009)
New Revision: 38392
Modified:
grass-addons/vector/v.krige/v.krige.py
Log:
added command output page (not active), as native GRASS modules' GUI. Some cleanup.
Modified: grass-addons/vector/v.krige/v.krige.py
===================================================================
--- grass-addons/vector/v.krige/v.krige.py 2009-07-13 12:57:48 UTC (rev 38391)
+++ grass-addons/vector/v.krige/v.krige.py 2009-07-13 13:18:02 UTC (rev 38392)
@@ -122,6 +122,7 @@
if not os.getenv("GRASS_WXBUNDLED"):
globalvar.CheckForWx()
import gselect
+import goutput
import wx
import wx.lib.flatnotebook as FN
@@ -174,7 +175,6 @@
#@TODO: print variogram?
##robjects.r.plot(Variogram.r['exp_var'], Variogram.r['var_model']) #does not work.
##see if it caused by automap/gstat dedicated plot function.
- #self.parent.log.write(_("Variogram fitted."))
def DoKriging(self, formula, inputdata, grid, model):
KrigingResult = robjects.r.krige(formula, inputdata, grid, model)
@@ -237,7 +237,7 @@
self.InputDataMap = gselect.VectorSelect(parent = self,
ftype = 'points',
updateOnPopup = False)
-
+ self.InputDataMap.SetFocus()
flexSizer.Add(item = self.InputDataMap)
flexSizer.Add(item = wx.StaticText(self, id=wx.ID_ANY, label=_("Column:")),
flag=wx.ALIGN_CENTER_VERTICAL)
@@ -260,11 +260,11 @@
for Rpackage in ["gstat"]: # , "geoR"]: #@TODO: enable it when it'll be implemented.
self.CreatePage(package = Rpackage)
- #@TODO(anne): check this dependency at the beginning.
- if self.RPackagesBook.GetPageCount() == 0:
- wx.MessageBox(parent=self,
- message=_("No R package with kriging functions available. Install either automap, gstat or geoR."),
- caption=_("Missing Dependency"), style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
+ ## Command output. From menuform module, cmdPanel class
+ self.goutput = goutput.GMConsole(parent=self, margin=True,
+ pageid=self.RPackagesBook.GetPageCount())
+ self.goutputId = self.RPackagesBook.GetPageCount()
+ self.outpage = self.RPackagesBook.AddPage(self.goutput, text=_("Command output") )
self.RPackagesBook.SetSelection(0)
KrigingSizer.Add(self.RPackagesBook, proportion=1, flag=wx.EXPAND)
More information about the grass-commit
mailing list