[GRASS-SVN] r54394 - in grass/trunk/gui/wxpython: docs iclass vdigit
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Dec 25 02:26:46 PST 2012
Author: martinl
Date: 2012-12-25 02:26:46 -0800 (Tue, 25 Dec 2012)
New Revision: 54394
Added:
grass/trunk/gui/wxpython/iclass/Makefile
grass/trunk/gui/wxpython/iclass/g.gui.iclass.html
grass/trunk/gui/wxpython/iclass/g.gui.iclass.py
Removed:
grass/trunk/gui/wxpython/docs/wxGUI.IClass.html
Modified:
grass/trunk/gui/wxpython/iclass/frame.py
grass/trunk/gui/wxpython/vdigit/g.gui.vdigit.html
Log:
g.gui.iclass added
Deleted: grass/trunk/gui/wxpython/docs/wxGUI.IClass.html
===================================================================
--- grass/trunk/gui/wxpython/docs/wxGUI.IClass.html 2012-12-24 22:52:36 UTC (rev 54393)
+++ grass/trunk/gui/wxpython/docs/wxGUI.IClass.html 2012-12-25 10:26:46 UTC (rev 54394)
@@ -1,84 +0,0 @@
-<!-- meta page description: wxGUI wxIClass -->
-<!-- meta page index: wxGUI -->
-<h2>DESCRIPTION</h2>
-
-<p>
-<b>WxIClass</b> is
-a <em><a href="wxGUI.html">wxGUI</a></em> compoment which allows the
-user to create training areas and generate spectral signatures.
-The resulting signature file can be used as input for
-<em><a href="i.maxlik.html">i.maxlik</a></em>
-or as a seed signature file for
-<em><a href="i.cluster.html">i.cluster</a></em>.
-<em>WxIClass</em> can be launched
-from the menu <tt>Imagery -> Classify image -> Interactive input for supervised classification</tt>.
-
-<p>
-<em>wxIClass</em> currently allows to:
-
-<ul>
- <li>create training areas
- (using <em><a href="wxGUI.Vector_Digitizer.html">vector
- digitizer</a></em>)</li>
- <li>show histograms for each band and class (category)</li>
- <li>show coincidence plots for each band</li>
- <li>show raster cells that match training areas
- (within the number of standard deviations specified)</li>
- <li>specify color of class</li>
- <li>write signature file</li>
- <li>import vector map</li>
- <li>export vector map with attribute table</li>
-
-</ul>
-
-<p>
-<em>wxIClass</em> performs the first pass in the GRASS two-pass supervised image
-classification process; the GRASS module
-<em><a href="i.maxlik.html">i.maxlik</a></em> executes the second pass.
-Both programs must be run to generate a classified map in GRASS
-raster format.
-
-<p>
-<em>wxIClass</em> is an interactive program that allows the user to create
-multiple training areas for multiple classes and calculate the spectral
-signatures based on the cells that are within the training areas.
-During this process the user will be
-shown histograms for each image band.
-The user can also display the cells of the image bands which fall within
-a user-specified number of standard deviations from the means in the spectral signature.
-By doing this, the user can see how much of the image
-is likely to be put into the class associated with the signature.
-
-<p>
-The spectral signatures are composed of region means and covariance matrices.
-These region means and covariance matrices are used in
-the second pass (<em><a href="i.maxlik.html">i.maxlik</a></em>)
-to classify the image.
-
-<p>
-Alternatively, the spectral signatures generated by <em>wxIClass</em> can be
-used for seed means for the clusters in
-<em><a href="i.cluster.html">i.cluster</a></em>.
-
-<h2>SEE ALSO</h2>
-
-<em>
- <a href="wxGUI.html">wxGUI</a><br>
- <a href="wxGUI.Components.html">wxGUI components</a>
-</em>
-
-<p>
-See also
-user <a href="http://grass.osgeo.org/wiki/WxIClass">wiki</a> page
-and <a href="http://trac.osgeo.org/grass/wiki/wxGUIDevelopment/wxIClass">development</a> page.
-
-<h2>AUTHOR</h2>
-
-Anna Kratochvilova,
- <a href="http://www.cvut.cz">Czech Technical University in Prague</a>, Czech Republic<br>
-
-Vaclav Petras,
- <a href="http://www.cvut.cz">Czech Technical University in Prague</a>, Czech Republic
-
-<p>
-<i>$Date$</i>
Copied: grass/trunk/gui/wxpython/iclass/Makefile (from rev 54393, grass/trunk/gui/wxpython/mapswipe/Makefile)
===================================================================
--- grass/trunk/gui/wxpython/iclass/Makefile (rev 0)
+++ grass/trunk/gui/wxpython/iclass/Makefile 2012-12-25 10:26:46 UTC (rev 54394)
@@ -0,0 +1,5 @@
+MODULE_TOPDIR = ../../..
+
+include $(MODULE_TOPDIR)/include/Make/GuiScript.make
+
+default: guiscript
Modified: grass/trunk/gui/wxpython/iclass/frame.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/frame.py 2012-12-24 22:52:36 UTC (rev 54393)
+++ grass/trunk/gui/wxpython/iclass/frame.py 2012-12-25 10:26:46 UTC (rev 54394)
@@ -69,7 +69,7 @@
It is wxGUI counterpart of old i.class module.
"""
- def __init__(self, parent = None, giface = None, title = _("Supervised Classification Tool"),
+ def __init__(self, parent = None, giface = None, title = _("GRASS GIS Supervised Classification Tool"),
toolbars = ["iClassMisc", "iClassMap", "vdigit", "iClass"],
size = (875, 600), name = 'IClassWindow', **kwargs):
"""!
@@ -279,8 +279,8 @@
BestSize((self.toolbars[name].GetBestSize())))
if name == "vdigit":
- self.toolbars[name] = VDigitToolbar(self, MapWindow = self.GetFirstWindow(),
- digitClass = IClassVDigit,
+ self.toolbars[name] = VDigitToolbar(parent = self, MapWindow = self.GetFirstWindow(),
+ digitClass = IClassVDigit, giface = self._giface,
tools = ['addArea', 'moveVertex', 'addVertex',
'removeVertex', 'editLine',
'moveLine', 'deleteArea', 'undo', 'redo'])
Copied: grass/trunk/gui/wxpython/iclass/g.gui.iclass.html (from rev 54393, grass/trunk/gui/wxpython/docs/wxGUI.IClass.html)
===================================================================
--- grass/trunk/gui/wxpython/iclass/g.gui.iclass.html (rev 0)
+++ grass/trunk/gui/wxpython/iclass/g.gui.iclass.html 2012-12-25 10:26:46 UTC (rev 54394)
@@ -0,0 +1,84 @@
+<!-- meta page description: wxGUI wxIClass -->
+<!-- meta page index: wxGUI -->
+<h2>DESCRIPTION</h2>
+
+<p>
+<b>WxIClass</b> is
+a <em><a href="wxGUI.html">wxGUI</a></em> compoment which allows the
+user to create training areas and generate spectral signatures.
+The resulting signature file can be used as input for
+<em><a href="i.maxlik.html">i.maxlik</a></em>
+or as a seed signature file for
+<em><a href="i.cluster.html">i.cluster</a></em>.
+<em>WxIClass</em> can be launched
+from the menu <tt>Imagery -> Classify image -> Interactive input for supervised classification</tt>.
+
+<p>
+<em>wxIClass</em> currently allows to:
+
+<ul>
+ <li>create training areas
+ (using <em><a href="wxGUI.Vector_Digitizer.html">vector
+ digitizer</a></em>)</li>
+ <li>show histograms for each band and class (category)</li>
+ <li>show coincidence plots for each band</li>
+ <li>show raster cells that match training areas
+ (within the number of standard deviations specified)</li>
+ <li>specify color of class</li>
+ <li>write signature file</li>
+ <li>import vector map</li>
+ <li>export vector map with attribute table</li>
+
+</ul>
+
+<p>
+<em>wxIClass</em> performs the first pass in the GRASS two-pass supervised image
+classification process; the GRASS module
+<em><a href="i.maxlik.html">i.maxlik</a></em> executes the second pass.
+Both programs must be run to generate a classified map in GRASS
+raster format.
+
+<p>
+<em>wxIClass</em> is an interactive program that allows the user to create
+multiple training areas for multiple classes and calculate the spectral
+signatures based on the cells that are within the training areas.
+During this process the user will be
+shown histograms for each image band.
+The user can also display the cells of the image bands which fall within
+a user-specified number of standard deviations from the means in the spectral signature.
+By doing this, the user can see how much of the image
+is likely to be put into the class associated with the signature.
+
+<p>
+The spectral signatures are composed of region means and covariance matrices.
+These region means and covariance matrices are used in
+the second pass (<em><a href="i.maxlik.html">i.maxlik</a></em>)
+to classify the image.
+
+<p>
+Alternatively, the spectral signatures generated by <em>wxIClass</em> can be
+used for seed means for the clusters in
+<em><a href="i.cluster.html">i.cluster</a></em>.
+
+<h2>SEE ALSO</h2>
+
+<em>
+ <a href="wxGUI.html">wxGUI</a><br>
+ <a href="wxGUI.Components.html">wxGUI components</a>
+</em>
+
+<p>
+See also
+user <a href="http://grass.osgeo.org/wiki/WxIClass">wiki</a> page
+and <a href="http://trac.osgeo.org/grass/wiki/wxGUIDevelopment/wxIClass">development</a> page.
+
+<h2>AUTHOR</h2>
+
+Anna Kratochvilova,
+ <a href="http://www.cvut.cz">Czech Technical University in Prague</a>, Czech Republic<br>
+
+Vaclav Petras,
+ <a href="http://www.cvut.cz">Czech Technical University in Prague</a>, Czech Republic
+
+<p>
+<i>$Date$</i>
Added: grass/trunk/gui/wxpython/iclass/g.gui.iclass.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/g.gui.iclass.py (rev 0)
+++ grass/trunk/gui/wxpython/iclass/g.gui.iclass.py 2012-12-25 10:26:46 UTC (rev 54394)
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+############################################################################
+#
+# MODULE: g.gui.iclass
+# AUTHOR(S): Anna Kratochvilova, Vaclav Petras
+# PURPOSE: The Map Swipe is a wxGUI component which allows the user to
+# interactively compare two maps
+# COPYRIGHT: (C) 2012 by Anna Kratochvilova, and the GRASS Development Team
+#
+# This program is free software; you can redistribute 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
+#% label: Tool for supervised classification of imagery data.
+#% description: Generates spectral signatures for an image by allowing the user to outline regions of interest.
+#%end
+
+import os
+import sys
+
+import wx
+import gettext
+
+import grass.script as grass
+
+if __name__ == '__main__':
+ sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
+
+from core.settings import UserSettings
+from core.giface import StandaloneGrassInterface
+from iclass.frame import IClassMapFrame
+
+def main():
+ # define display driver
+ driver = UserSettings.Get(group = 'display', key = 'driver', subkey = 'type')
+ if driver == 'png':
+ os.environ['GRASS_RENDER_IMMEDIATE'] = 'png'
+ else:
+ os.environ['GRASS_RENDER_IMMEDIATE'] = 'cairo'
+
+ # launch application
+ app = wx.PySimpleApp()
+ wx.InitAllImageHandlers()
+
+ # show main frame
+ frame = IClassMapFrame(parent = None, giface = StandaloneGrassInterface())
+ frame.Show()
+
+ app.MainLoop()
+
+if __name__ == '__main__':
+ gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
+ options, flags = grass.parser()
+ main()
Property changes on: grass/trunk/gui/wxpython/iclass/g.gui.iclass.py
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
Modified: grass/trunk/gui/wxpython/vdigit/g.gui.vdigit.html
===================================================================
--- grass/trunk/gui/wxpython/vdigit/g.gui.vdigit.html 2012-12-24 22:52:36 UTC (rev 54393)
+++ grass/trunk/gui/wxpython/vdigit/g.gui.vdigit.html 2012-12-25 10:26:46 UTC (rev 54394)
@@ -3,15 +3,15 @@
<h2>DESCRIPTION</h2>
<b>Vector digitizer</b> is a <em><a href="wxGUI.html">wxGUI</a></em>
-component intended for interactive editing vector maps
+component intended for interactive editing and digitizing vector maps
(see <em><a href="v.edit.html">v.edit</a></em> for non-interactive
vector editing GRASS capabilities).
<p>
-The digitizer supports editing of 2D vector features (points, lines, centroids,
-boundaries, and area).
+The digitizer supports editing of 2D vector features (points, lines,
+centroids, boundaries, and areas).
-Vector features can be selected using mouse or by query (e.g. minimal
+Vector features can be selected by mouse or by query (e.g. minimal
vector line length). Vector features can be selected by bounding box
or simply by mouse click (based on 'Settings→General→Select
threshold' value).
More information about the grass-commit
mailing list