[GRASS-SVN] r63579 - grass/trunk/scripts/i.pansharpen

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 17 07:48:19 PST 2014


Author: neteler
Date: 2014-12-17 07:48:18 -0800 (Wed, 17 Dec 2014)
New Revision: 63579

Modified:
   grass/trunk/scripts/i.pansharpen/i.pansharpen.html
   grass/trunk/scripts/i.pansharpen/i.pansharpen.py
Log:
i.pansharpen: update parameters of IHS module calls (trac #2409)

Modified: grass/trunk/scripts/i.pansharpen/i.pansharpen.html
===================================================================
--- grass/trunk/scripts/i.pansharpen/i.pansharpen.html	2014-12-17 13:16:40 UTC (rev 63578)
+++ grass/trunk/scripts/i.pansharpen/i.pansharpen.html	2014-12-17 15:48:18 UTC (rev 63579)
@@ -157,6 +157,7 @@
 
 # display at 14.25m
 g.region rast=lsat7_2002_ihs_red -p
+d.erase
 d.rgb r=lsat7_2002_ihs_red g=lsat7_2002_ihs_green b=lsat7_2002_ihs_blue
 
 # compare before/after (RGB support in "Advanced"):

Modified: grass/trunk/scripts/i.pansharpen/i.pansharpen.py
===================================================================
--- grass/trunk/scripts/i.pansharpen/i.pansharpen.py	2014-12-17 13:16:40 UTC (rev 63578)
+++ grass/trunk/scripts/i.pansharpen/i.pansharpen.py	2014-12-17 15:48:18 UTC (rev 63579)
@@ -183,12 +183,12 @@
         # transform RGB channels into IHS color space
         grass.message(_("Transforming to IHS color space..."))
         grass.run_command('i.rgb.his', overwrite=True,
-                          red_input=ms3,
-                          green_input=ms2,
-                          blue_input=ms1,
-                          hue_output="tmp%s_hue" % pid,
-                          intensity_output="tmp%s_int" % pid,
-                          saturation_output="tmp%s_sat" % pid)
+                          red=ms3,
+                          green=ms2,
+                          blue=ms1,
+                          hue="tmp%s_hue" % pid,
+                          intensity="tmp%s_int" % pid,
+                          saturation="tmp%s_sat" % pid)
 
         # pan/intensity histogram matching using linear regression
         target = "tmp%s_int" % pid
@@ -198,12 +198,12 @@
         # substitute pan for intensity channel and transform back to RGB color space
         grass.message(_("Transforming back to RGB color space and sharpening..."))
         grass.run_command('i.his.rgb', overwrite=True,
-                          hue_input="tmp%s_hue" % pid,
-                          intensity_input="%s" % panmatch,
-                          saturation_input="tmp%s_sat" % pid,
-                          red_output="%s_red" % out,
-                          green_output="%s_green" % out,
-                          blue_output="%s_blue" % out)
+                          hue="tmp%s_hue" % pid,
+                          intensity="%s" % panmatch,
+                          saturation="tmp%s_sat" % pid,
+                          red="%s_red" % out,
+                          green="%s_green" % out,
+                          blue="%s_blue" % out)
 
         # Cleanup
         grass.run_command('g.remove', flags='f', quiet=True, type='rast',



More information about the grass-commit mailing list