[GRASS-SVN] r44724 - grass/trunk/scripts/i.spectral

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 25 16:10:50 EST 2010


Author: glynn
Date: 2010-12-25 13:10:50 -0800 (Sat, 25 Dec 2010)
New Revision: 44724

Modified:
   grass/trunk/scripts/i.spectral/i.spectral.py
Log:
Fix script to match changes to i.group


Modified: grass/trunk/scripts/i.spectral/i.spectral.py
===================================================================
--- grass/trunk/scripts/i.spectral/i.spectral.py	2010-12-25 21:07:51 UTC (rev 44723)
+++ grass/trunk/scripts/i.spectral/i.spectral.py	2010-12-25 21:10:50 UTC (rev 44724)
@@ -193,18 +193,8 @@
 
     if group:
 	# ## PARSES THE GROUP FILES - gets rid of ugly header info from group list output
-	maps = []
-	s = grass.read_command('i.group', flags='l', group = group, quiet = True)
-	active = False
-	for l in s.splitlines():
-	    if l == '-------------':
-		active = not active
-		continue
-	    if not active:
-		continue
-	    f = l.replace(' in ','@').split()
-	    maps += f
-	rastermaps = maps
+	s = grass.read_command('i.group', flags='g', group = group, quiet = True)
+	rastermaps = s.splitlines()
     else:
 	# ## get data from list of files and set the x-axis labels
 	rastermaps = raster.split(',')



More information about the grass-commit mailing list