[GRASS-SVN] r63213 - grass/trunk/scripts/i.tasscap

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Nov 27 09:59:29 PST 2014


Author: neteler
Date: 2014-11-27 09:59:29 -0800 (Thu, 27 Nov 2014)
New Revision: 63213

Modified:
   grass/trunk/scripts/i.tasscap/i.tasscap.py
Log:
i.tasscap: write out some metadata

Modified: grass/trunk/scripts/i.tasscap/i.tasscap.py
===================================================================
--- grass/trunk/scripts/i.tasscap/i.tasscap.py	2014-11-27 17:55:27 UTC (rev 63212)
+++ grass/trunk/scripts/i.tasscap/i.tasscap.py	2014-11-27 17:59:29 UTC (rev 63213)
@@ -129,7 +129,7 @@
         if band_num == 6:
             band_num = 7
         bands['band' + str(band_num)] = band
-    print bands
+    grass.debug(1, bands)
 
     if satellite == 'landsat4_tm':
         calcN(output_basename, bands, 0, 4)
@@ -144,6 +144,11 @@
     else:
         raise RuntimeError("Invalid satellite: " + satellite)
 
+    grass.run_command('r.support', map = "%s.%d" % (output_basename, 1), description = "Tasseled Cap 1: brightness")
+    grass.run_command('r.support', map = "%s.%d" % (output_basename, 2), description = "Tasseled Cap 2: greenness")
+    grass.run_command('r.support', map = "%s.%d" % (output_basename, 3), description = "Tasseled Cap 3: wetness")
+    grass.run_command('r.support', map = "%s.%d" % (output_basename, 4), description = "Tasseled Cap 4: atmospheric haze")
+
     grass.message(_("Tasseled Cap components calculated"))
 
 if __name__ == "__main__":



More information about the grass-commit mailing list