[GRASS-SVN] r53744 - in grass/trunk/gui/wxpython: . docs gmodeler
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Nov 9 05:45:48 PST 2012
Author: martinl
Date: 2012-11-09 05:45:48 -0800 (Fri, 09 Nov 2012)
New Revision: 53744
Added:
grass/trunk/gui/wxpython/gmodeler/Makefile
grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.html
grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py
grass/trunk/gui/wxpython/gmodeler/g.gui.mapswipe.html
grass/trunk/gui/wxpython/gmodeler/gmodeler_frame.jpg
Removed:
grass/trunk/gui/wxpython/docs/wxGUI.Modeler.html
grass/trunk/gui/wxpython/docs/wxGUI_modeler.jpg
Modified:
grass/trunk/gui/wxpython/Makefile
grass/trunk/gui/wxpython/gmodeler/frame.py
Log:
implement g.gui.gmodeler
Modified: grass/trunk/gui/wxpython/Makefile
===================================================================
--- grass/trunk/gui/wxpython/Makefile 2012-11-09 13:21:58 UTC (rev 53743)
+++ grass/trunk/gui/wxpython/Makefile 2012-11-09 13:45:48 UTC (rev 53744)
@@ -1,6 +1,6 @@
MODULE_TOPDIR = ../..
-SUBDIRS = docs mapswipe
+SUBDIRS = docs mapswipe gmodeler
EXTRA_CLEAN_FILES = menustrings.py build_ext.pyc
include $(MODULE_TOPDIR)/include/Make/Dir.make
Deleted: grass/trunk/gui/wxpython/docs/wxGUI.Modeler.html
===================================================================
--- grass/trunk/gui/wxpython/docs/wxGUI.Modeler.html 2012-11-09 13:21:58 UTC (rev 53743)
+++ grass/trunk/gui/wxpython/docs/wxGUI.Modeler.html 2012-11-09 13:45:48 UTC (rev 53744)
@@ -1,58 +0,0 @@
-<!-- meta page description: wxGUI Graphical Modeler -->
-<!-- meta page index: wxGUI -->
-<h2>DESCRIPTION</h2>
-
-<p>
-The <b>Graphical Modeler</b> is
-a <em><a href="wxGUI.html">wxGUI</a></em> compoment which allows the
-user to create, edit, and manage models. The modeler can be launched
-from the menu <tt>File -> Graphical modeler</tt> or by
-clicking on icon <img src="icons/modeler-main.png" alt="icon"> in the toolbar.
-
-<p>
-The modeler currently allows to:
-
-<ul>
- <li>define data items (raster, vector, 3D raster maps)</li>
- <li>define actions (GRASS commands)</li>
- <li>define relations between data and action items</li>
- <li>define loops (eg. map series) and conditions (if-else statements)</li>
- <li>define model variables</li>
- <li>parameterize commands</li>
- <li>define intermediate data</li>
- <li>validate and run model</li>
- <li>store model properties to the file (<tt>GRASS Model File|*.gxm</tt>)</li>
- <li>export model to Python script</li>
- <li>export model to image file</li>
-</ul>
-
-<center>
-<br>
-<img src="wxGUI_modeler.jpg" border="1" alt="screenshot">
-<br><br>
-</center>
-
-<h2>SEE ALSO</h2>
-
-<em>
- <a href="wxGUI.html">wxGUI</a><br>
- <a href="wxGUI.Components.html">wxGUI components</a>
-</em>
-
-<p>
-User-defined models available
-from <a href="http://svn.osgeo.org/grass/grass-addons/models">SVN</a>.
-
-<p>
-See also
-user <a href="http://grass.osgeo.org/wiki/WxGUI_Modeler">wiki</a> page
-(especially various <a href="http://grass.osgeo.org/wiki/WxGUI_Modeler#Video_tutorials">video
-tutorials</a>).
-
-<h2>AUTHOR</h2>
-
-<a href="http://geo.fsv.cvut.cz/gwiki/Landa">Martin Landa</a>, <a
-href="http://www.cvut.cz">Czech Technical University in Prague</a>, Czech Republic
-
-<p>
-<i>$Date$</i>
Deleted: grass/trunk/gui/wxpython/docs/wxGUI_modeler.jpg
===================================================================
(Binary files differ)
Added: grass/trunk/gui/wxpython/gmodeler/Makefile
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/Makefile (rev 0)
+++ grass/trunk/gui/wxpython/gmodeler/Makefile 2012-11-09 13:45:48 UTC (rev 53744)
@@ -0,0 +1,13 @@
+MODULE_TOPDIR = ../../..
+
+PGM = g.gui.gmodeler
+WXPGM = Modeler
+
+include $(MODULE_TOPDIR)/include/Make/Script.make
+
+default: script
+ -rm -f $(PGM).tmp.html
+ $(MAKE) $(HTMLDIR)/wxGUI.$(WXPGM).html
+
+$(HTMLDIR)/wxGUI.$(WXPGM).html: $(PGM).html | $(HTMLDIR)
+ $(PYTHON) $(GISBASE)/tools/mkhtml.py $(PGM) $(GRASS_VERSION_DATE) > $@
Property changes on: grass/trunk/gui/wxpython/gmodeler/Makefile
___________________________________________________________________
Added: svn:mime-type
+ text/x-makefile
Added: svn:eol-style
+ native
Modified: grass/trunk/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/frame.py 2012-11-09 13:21:58 UTC (rev 53743)
+++ grass/trunk/gui/wxpython/gmodeler/frame.py 2012-11-09 13:45:48 UTC (rev 53744)
@@ -28,9 +28,6 @@
import copy
import re
-if __name__ == "__main__":
- sys.path.append(os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython'))
-
import wx
from wx.lib import ogl
import wx.lib.flatnotebook as FN
@@ -1635,19 +1632,3 @@
def IsEmpty(self):
"""!Check if python script is empty"""
return len(self.body.GetText()) == 0
-
-def main():
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
-
- app = wx.PySimpleApp()
- wx.InitAllImageHandlers()
- frame = ModelFrame(parent = None)
- if len(sys.argv) > 1:
- frame.LoadModelFile(sys.argv[1])
- frame.Show()
-
- app.MainLoop()
-
-if __name__ == "__main__":
- main()
Copied: grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.html (from rev 53743, grass/trunk/gui/wxpython/docs/wxGUI.Modeler.html)
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.html (rev 0)
+++ grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.html 2012-11-09 13:45:48 UTC (rev 53744)
@@ -0,0 +1,58 @@
+<!-- meta page description: wxGUI Graphical Modeler -->
+<!-- meta page index: wxGUI -->
+<h2>DESCRIPTION</h2>
+
+<p>
+The <b>Graphical Modeler</b> is
+a <em><a href="wxGUI.html">wxGUI</a></em> compoment which allows the
+user to create, edit, and manage models. The modeler can be launched
+from the menu <tt>File -> Graphical modeler</tt> or by
+clicking on icon <img src="icons/modeler-main.png" alt="icon"> in the toolbar.
+
+<p>
+The modeler currently allows to:
+
+<ul>
+ <li>define data items (raster, vector, 3D raster maps)</li>
+ <li>define actions (GRASS commands)</li>
+ <li>define relations between data and action items</li>
+ <li>define loops (eg. map series) and conditions (if-else statements)</li>
+ <li>define model variables</li>
+ <li>parameterize commands</li>
+ <li>define intermediate data</li>
+ <li>validate and run model</li>
+ <li>store model properties to the file (<tt>GRASS Model File|*.gxm</tt>)</li>
+ <li>export model to Python script</li>
+ <li>export model to image file</li>
+</ul>
+
+<center>
+<br>
+<img src="gmodeler_frame.jpg" border="1" alt="screenshot">
+<br><br>
+</center>
+
+<h2>SEE ALSO</h2>
+
+<em>
+ <a href="wxGUI.html">wxGUI</a><br>
+ <a href="wxGUI.Components.html">wxGUI components</a>
+</em>
+
+<p>
+User-defined models available
+from <a href="http://svn.osgeo.org/grass/grass-addons/models">SVN</a>.
+
+<p>
+See also
+user <a href="http://grass.osgeo.org/wiki/WxGUI_Modeler">wiki</a> page
+(especially various <a href="http://grass.osgeo.org/wiki/WxGUI_Modeler#Video_tutorials">video
+tutorials</a>).
+
+<h2>AUTHOR</h2>
+
+<a href="http://geo.fsv.cvut.cz/gwiki/Landa">Martin Landa</a>, <a
+href="http://www.cvut.cz">Czech Technical University in Prague</a>, Czech Republic
+
+<p>
+<i>$Date$</i>
Added: grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py (rev 0)
+++ grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py 2012-11-09 13:45:48 UTC (rev 53744)
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+############################################################################
+#
+# MODULE: Graphical Modeler
+# AUTHOR(S): Martin Landa <landa.martin gmail.com>
+# PURPOSE: Graphical Modeler to create, edit, and manage models
+# COPYRIGHT: (C) 2010-2012 by Martin Landa, and the GRASS Development Team
+#
+# This program is free software; you can 1redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+############################################################################
+
+#%module
+#% description: Allows to interactively create, edit and manage models.
+#% keywords: general
+#% keywords: gui
+#% keywords: graphical modeler
+#% keywords: workflow
+#%end
+#%option G_OPT_F_INPUT
+#% key: file
+#% description: Name of model file to be loaded (*.gmx)
+#% required: no
+#%end
+
+import os
+import sys
+
+import wx
+import gettext
+
+import grass.script as grass
+
+sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
+
+from gmodeler.frame import ModelFrame
+
+def main():
+ import gettext
+ gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
+
+ app = wx.PySimpleApp()
+ wx.InitAllImageHandlers()
+ frame = ModelFrame(parent = None)
+ if options['file']:
+ frame.LoadModelFile(options['file'])
+ frame.Show()
+
+ app.MainLoop()
+
+if __name__ == "__main__":
+ options, flags = grass.parser()
+ main()
Property changes on: grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Added: grass/trunk/gui/wxpython/gmodeler/g.gui.mapswipe.html
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/g.gui.mapswipe.html (rev 0)
+++ grass/trunk/gui/wxpython/gmodeler/g.gui.mapswipe.html 2012-11-09 13:45:48 UTC (rev 53744)
@@ -0,0 +1,48 @@
+<!-- meta page description: wxGUI Map Swipe -->
+<!-- meta page index: wxGUI -->
+<h2>DESCRIPTION</h2>
+
+The <b>Map Swipe</b> is a <em><a href="wxGUI.html">wxGUI</a></em> component
+which allows the user to interactively compare two raster maps of the same
+area by revealing different parts of the raster maps.
+It is useful e.g. for comparing raster maps from different time periods.
+Map Swipe can be launched from the menu <tt>File -> Map Swipe</tt>.
+
+<p>
+Map Swipe allows to:
+
+<ul>
+ <li>switch orientation of the swipe line (horizontal or vertical)</li>
+ <li>zooming, panning</li>
+ <li>automatically load maps when opening Map Swipe with two selected raster maps in Layer Manager</li>
+</ul>
+
+<center>
+<br>
+<img src="mapswipe_tsunami.jpg" border="1" alt="Map swipe screenshot">
+<br>Pre and post disaster images of the tsunami in Japan in 2011. The upper MODIS image
+taken on February 26, 2011, shows the coastline under normal conditions while the lower
+MODIS image on March 13, 2011, shows a clear view of tsunami flooding along the coastline.
+Water, black and dark blue in these false-color images, still covers the ground as much
+as five kilometers (three miles) from the coast.
+Source: <a href="http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=49634">Earth Observatory/NASA</a>
+<br>
+</center>
+
+<h2>SEE ALSO</h2>
+
+<em>
+ <a href="wxGUI.html">wxGUI</a><br>
+ <a href="wxGUI.Components.html">wxGUI components</a>
+</em>
+
+<p>
+See also the user <a href="http://grass.osgeo.org/wiki/WxGUI_Map_Swipe">wiki</a> page.
+
+<h2>AUTHOR</h2>
+
+Anna Kratochvilova,
+<a href="http://www.cvut.cz">Czech Technical University in Prague</a>, Czech Republic
+
+<p>
+<i>$Date$</i>
Property changes on: grass/trunk/gui/wxpython/gmodeler/g.gui.mapswipe.html
___________________________________________________________________
Added: svn:mime-type
+ text/html
Added: svn:keywords
+ Author Date Id
Added: svn:eol-style
+ native
Copied: grass/trunk/gui/wxpython/gmodeler/gmodeler_frame.jpg (from rev 53743, grass/trunk/gui/wxpython/docs/wxGUI_modeler.jpg)
===================================================================
(Binary files differ)
More information about the grass-commit
mailing list