[GRASS-SVN] r71081 - in grass/trunk/gui/wxpython: . photo2image
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri May 12 05:47:31 PDT 2017
Author: ychemin
Date: 2017-05-12 05:47:31 -0700 (Fri, 12 May 2017)
New Revision: 71081
Added:
grass/trunk/gui/wxpython/photo2image/
grass/trunk/gui/wxpython/photo2image/g.gui.photo2image.html
grass/trunk/gui/wxpython/photo2image/g.gui.photo2image.py
Removed:
grass/trunk/gui/wxpython/iphoto2image/
grass/trunk/gui/wxpython/photo2image/g.gui.iphoto2image.html
grass/trunk/gui/wxpython/photo2image/g.gui.iphoto2image.py
Log:
renamed iphoto2image to photo2image
Deleted: grass/trunk/gui/wxpython/photo2image/g.gui.iphoto2image.html
===================================================================
--- grass/trunk/gui/wxpython/iphoto2image/g.gui.iphoto2image.html 2017-05-12 12:46:00 UTC (rev 71080)
+++ grass/trunk/gui/wxpython/photo2image/g.gui.iphoto2image.html 2017-05-12 12:47:31 UTC (rev 71081)
@@ -1,69 +0,0 @@
-<!-- meta page description: wxGUI GCP Manager for photo to image registration -->
-<!-- meta page index: topic_gui|GUI -->
-<h2>DESCRIPTION</h2>
-This module is based on <b>g.gui.gcp</b>, the GCP manager of GRASS GIS.
-It is part of i.ortho.photo suite.
-
-<p>
-The aim of this module is to give absolute location values to the fiducial
-points present (in number of 4 or 8) in a <i>scanned</i> aerial photo.
-
-<p>
-This is necessary as (manual) scanning introduces distortions, rotations and also
-may not be limited to scan the boundary of the photo itself. It is thus necessary
-to give to each fiducial the exact coordinates in mm as given by the aerial
-photographic instrument design, which is unique per camera.
-
-<p>
-This module requires you to have made a group with your aerial photo <b>(i.group)</b>, a camera
-description file <b>(i.ortho.target)</b> and use them to launch the module. Additional requirements
-are the order of rectification (1 if no of Fiducials is 4, 2 if no of Fiducials is 8) and
-an extension file (if not given, defaults to \$filename_ip2i_out)
-
-<p>
-An example for Location <b>imagery60</b>:
-
-<div class="code"><pre>
-g.gui.iphoto2image group=aerial at PERMANENT raster=gs13.1 at PERMANENT camera=gscamera order=2 extension=try --o
-</pre></div>
-
-<h3>Screenshot of g.gui.iphoto2image</h3>
-
-<div align="center" style="margin: 10px">
-<a href="wxGUI_iphoto2image_frame.jpg">
-<img src="wxGUI_iphoto2image_frame.jpg" width="600" alt="Screenshot of g.gui.iphoto2image" border=0>
-</a><br>
-<i>Figure: Screenshot of g.gui.iphoto2image</i>
-</div>
-
-<h2>For a detailed operation manual please read</h2>
-
-<em>
-<a href="wxGUI.html">wxGUI</a><br>
-<a href="wxGUI.components.html">wxGUI components</a>
-</em>
-
-<p>
-See also <a href="http://grasswiki.osgeo.org/wiki/WxGUI/Video_tutorials#Georectifier">video
-tutorials</a> on GRASS Wiki.
-
-<h2>SEE ALSO</h2>
-
-<em>
-<a href="i.ortho.photo.html">i.ortho.photo</a>,
-<a href="i.group.html">i.group</a>,
-<a href="i.ortho.camera.html">i.ortho.camera</a>,
-<a href="i.ortho.target.html">i.ortho.target</a>,
-<a href="i.rectify.html">i.rectify</a>,
-<a href="m.transform.html">m.transform</a>,
-<a href="v.rectify.html">v.rectify</a>
-</em>
-
-<h2>AUTHORS</h2>
-
-Markus Metz<br><br>
-<em>Based on the Georectifier (GRASS 6.4.0)</em> by Michael Barton<br>
-Martin Landa, Czech Technical University in Prague, Czech Republic
-
-<p>
-<i>$Date$</i>
Deleted: grass/trunk/gui/wxpython/photo2image/g.gui.iphoto2image.py
===================================================================
--- grass/trunk/gui/wxpython/iphoto2image/g.gui.iphoto2image.py 2017-05-12 12:46:00 UTC (rev 71080)
+++ grass/trunk/gui/wxpython/photo2image/g.gui.iphoto2image.py 2017-05-12 12:47:31 UTC (rev 71081)
@@ -1,127 +0,0 @@
-#!/usr/bin/env python
-
-############################################################################
-#
-# MODULE: Correcting distortions of a scanned photo (modified from GCP Manager)
-# AUTHOR(S): Yann modified the code (was Markus Metz for the GCP Manager)
-# PURPOSE: Takes a scanned photo and fits fiducial points to known geometry
-# COPYRIGHT: (C) 2012-2017 by Markus Metz, 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
-#% description: Corrects scanning distortions of a paper photo.
-#% keyword: imagery
-#% keyword: aerial
-#% keyword: photo
-#% keyword: GUI
-#%end
-
-#%option G_OPT_I_GROUP
-#% key: group
-#% required: yes
-#%end
-
-#%option G_OPT_R_INPUT
-#% key: raster
-#% required: yes
-#%end
-
-#%option
-#% key: camera
-#% type: string
-#% label: The name of the camera (generated in i.ortho.camera)
-#% description: The name of the camera (generated in i.ortho.camera)
-#% required: yes
-#%end
-
-#%option
-#% key: order
-#% type: string
-#% label: The rectification order (no of Fiducial=4 -> order=1, no of Fiducial=8 -> order=2)
-#% description: The rectification order (no of Fiducial=4 -> order=1, no of Fiducial=8 -> order=2)
-#% required: yes
-#% answer: 1
-#%end
-
-#%option
-#% key: extension
-#% type: string
-#% label: The name of the output files extension (used in i.rectify)
-#% description: The name of the output files extension (used in i.rectify)
-#% required: yes
-#% answer: _ip2i_out
-#%end
-
-"""
-Module to run GCP management tool as stadalone application.
- at author Vaclav Petras <wenzeslaus gmail.com> (standalone module)
-"""
-import os
-import grass.script as gscript
-
-def main():
- """Sets the GRASS display driver
- """
- options, flags = gscript.parser()
-
- import wx
- from grass.script.setup import set_gui_path
- set_gui_path()
-
- from core.settings import UserSettings
- from core.globalvar import CheckWxVersion
- from core.giface import StandaloneGrassInterface
- from iphoto2image.ip2i_manager import GCPWizard
-
- 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'
-
- if options['group']:
- group = options['group']
- else:
- gscript.fatal(_("Please provide a group name to process"))
-
- if options['raster']:
- raster = options['raster']
- else:
- gscript.fatal(_("Please provide a raster map name to process"))
-
- if options['camera']:
- camera = options['camera']
- else:
- gscript.fatal(_("Please provide a camera name (generated by i.ortho.camera)"))
-
- if options['order']:
- order = options['order']
- else:
- gscript.fatal(_("Please provive an order value (1 if 4 Fiducials, 2 if 8 Fiducials)"))
-
- if options['extension']:
- extension = options['extension']
- else:
- gscript.fatal(_("Please provive an output files extension (used by i.rectify)"))
-
- app = wx.App()
- if not CheckWxVersion([2, 9]):
- wx.InitAllImageHandlers()
-
- wizard = GCPWizard(parent=None, giface=StandaloneGrassInterface(), group=group,
- raster=raster, raster1=raster, camera=camera, order=order, extension=extension)
- app.MainLoop()
-
-if __name__ == '__main__':
- main()
Copied: grass/trunk/gui/wxpython/photo2image/g.gui.photo2image.html (from rev 71079, grass/trunk/gui/wxpython/iphoto2image/g.gui.iphoto2image.html)
===================================================================
--- grass/trunk/gui/wxpython/photo2image/g.gui.photo2image.html (rev 0)
+++ grass/trunk/gui/wxpython/photo2image/g.gui.photo2image.html 2017-05-12 12:47:31 UTC (rev 71081)
@@ -0,0 +1,69 @@
+<!-- meta page description: wxGUI GCP Manager for photo to image registration -->
+<!-- meta page index: topic_gui|GUI -->
+<h2>DESCRIPTION</h2>
+This module is based on <b>g.gui.gcp</b>, the GCP manager of GRASS GIS.
+It is part of i.ortho.photo suite.
+
+<p>
+The aim of this module is to give absolute location values to the fiducial
+points present (in number of 4 or 8) in a <i>scanned</i> aerial photo.
+
+<p>
+This is necessary as (manual) scanning introduces distortions, rotations and also
+may not be limited to scan the boundary of the photo itself. It is thus necessary
+to give to each fiducial the exact coordinates in mm as given by the aerial
+photographic instrument design, which is unique per camera.
+
+<p>
+This module requires you to have made a group with your aerial photo <b>(i.group)</b>, a camera
+description file <b>(i.ortho.target)</b> and use them to launch the module. Additional requirements
+are the order of rectification (1 if no of Fiducials is 4, 2 if no of Fiducials is 8) and
+an extension file (if not given, defaults to \$filename_ip2i_out)
+
+<p>
+An example for Location <b>imagery60</b>:
+
+<div class="code"><pre>
+g.gui.iphoto2image group=aerial at PERMANENT raster=gs13.1 at PERMANENT camera=gscamera order=2 extension=try --o
+</pre></div>
+
+<h3>Screenshot of g.gui.iphoto2image</h3>
+
+<div align="center" style="margin: 10px">
+<a href="wxGUI_iphoto2image_frame.jpg">
+<img src="wxGUI_iphoto2image_frame.jpg" width="600" alt="Screenshot of g.gui.iphoto2image" border=0>
+</a><br>
+<i>Figure: Screenshot of g.gui.iphoto2image</i>
+</div>
+
+<h2>For a detailed operation manual please read</h2>
+
+<em>
+<a href="wxGUI.html">wxGUI</a><br>
+<a href="wxGUI.components.html">wxGUI components</a>
+</em>
+
+<p>
+See also <a href="http://grasswiki.osgeo.org/wiki/WxGUI/Video_tutorials#Georectifier">video
+tutorials</a> on GRASS Wiki.
+
+<h2>SEE ALSO</h2>
+
+<em>
+<a href="i.ortho.photo.html">i.ortho.photo</a>,
+<a href="i.group.html">i.group</a>,
+<a href="i.ortho.camera.html">i.ortho.camera</a>,
+<a href="i.ortho.target.html">i.ortho.target</a>,
+<a href="i.rectify.html">i.rectify</a>,
+<a href="m.transform.html">m.transform</a>,
+<a href="v.rectify.html">v.rectify</a>
+</em>
+
+<h2>AUTHORS</h2>
+
+Markus Metz<br><br>
+<em>Based on the Georectifier (GRASS 6.4.0)</em> by Michael Barton<br>
+Martin Landa, Czech Technical University in Prague, Czech Republic
+
+<p>
+<i>$Date$</i>
Copied: grass/trunk/gui/wxpython/photo2image/g.gui.photo2image.py (from rev 71079, grass/trunk/gui/wxpython/iphoto2image/g.gui.iphoto2image.py)
===================================================================
--- grass/trunk/gui/wxpython/photo2image/g.gui.photo2image.py (rev 0)
+++ grass/trunk/gui/wxpython/photo2image/g.gui.photo2image.py 2017-05-12 12:47:31 UTC (rev 71081)
@@ -0,0 +1,127 @@
+#!/usr/bin/env python
+
+############################################################################
+#
+# MODULE: Correcting distortions of a scanned photo (modified from GCP Manager)
+# AUTHOR(S): Yann modified the code (was Markus Metz for the GCP Manager)
+# PURPOSE: Takes a scanned photo and fits fiducial points to known geometry
+# COPYRIGHT: (C) 2012-2017 by Markus Metz, 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
+#% description: Corrects scanning distortions of a paper photo.
+#% keyword: imagery
+#% keyword: aerial
+#% keyword: photo
+#% keyword: GUI
+#%end
+
+#%option G_OPT_I_GROUP
+#% key: group
+#% required: yes
+#%end
+
+#%option G_OPT_R_INPUT
+#% key: raster
+#% required: yes
+#%end
+
+#%option
+#% key: camera
+#% type: string
+#% label: The name of the camera (generated in i.ortho.camera)
+#% description: The name of the camera (generated in i.ortho.camera)
+#% required: yes
+#%end
+
+#%option
+#% key: order
+#% type: string
+#% label: The rectification order (no of Fiducial=4 -> order=1, no of Fiducial=8 -> order=2)
+#% description: The rectification order (no of Fiducial=4 -> order=1, no of Fiducial=8 -> order=2)
+#% required: yes
+#% answer: 1
+#%end
+
+#%option
+#% key: extension
+#% type: string
+#% label: The name of the output files extension (used in i.rectify)
+#% description: The name of the output files extension (used in i.rectify)
+#% required: yes
+#% answer: _ip2i_out
+#%end
+
+"""
+Module to run GCP management tool as stadalone application.
+ at author Vaclav Petras <wenzeslaus gmail.com> (standalone module)
+"""
+import os
+import grass.script as gscript
+
+def main():
+ """Sets the GRASS display driver
+ """
+ options, flags = gscript.parser()
+
+ import wx
+ from grass.script.setup import set_gui_path
+ set_gui_path()
+
+ from core.settings import UserSettings
+ from core.globalvar import CheckWxVersion
+ from core.giface import StandaloneGrassInterface
+ from iphoto2image.ip2i_manager import GCPWizard
+
+ 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'
+
+ if options['group']:
+ group = options['group']
+ else:
+ gscript.fatal(_("Please provide a group name to process"))
+
+ if options['raster']:
+ raster = options['raster']
+ else:
+ gscript.fatal(_("Please provide a raster map name to process"))
+
+ if options['camera']:
+ camera = options['camera']
+ else:
+ gscript.fatal(_("Please provide a camera name (generated by i.ortho.camera)"))
+
+ if options['order']:
+ order = options['order']
+ else:
+ gscript.fatal(_("Please provive an order value (1 if 4 Fiducials, 2 if 8 Fiducials)"))
+
+ if options['extension']:
+ extension = options['extension']
+ else:
+ gscript.fatal(_("Please provive an output files extension (used by i.rectify)"))
+
+ app = wx.App()
+ if not CheckWxVersion([2, 9]):
+ wx.InitAllImageHandlers()
+
+ wizard = GCPWizard(parent=None, giface=StandaloneGrassInterface(), group=group,
+ raster=raster, raster1=raster, camera=camera, order=order, extension=extension)
+ app.MainLoop()
+
+if __name__ == '__main__':
+ main()
More information about the grass-commit
mailing list