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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 26 04:19:33 PDT 2018


Author: marisn
Date: 2018-04-26 04:19:33 -0700 (Thu, 26 Apr 2018)
New Revision: 72650

Modified:
   grass/trunk/scripts/i.spectral/i.spectral.py
Log:
i.spectral: Add subgroup option


Modified: grass/trunk/scripts/i.spectral/i.spectral.py
===================================================================
--- grass/trunk/scripts/i.spectral/i.spectral.py	2018-04-26 10:20:18 UTC (rev 72649)
+++ grass/trunk/scripts/i.spectral/i.spectral.py	2018-04-26 11:19:33 UTC (rev 72650)
@@ -36,6 +36,10 @@
 #% required : no
 #% guisection: Input
 #%end
+#%option G_OPT_I_SUBGROUP
+#% required : no
+#% guisection: Input
+#%end
 #%option G_OPT_R_INPUTS
 #% key: raster
 #% required : no
@@ -198,6 +202,7 @@
 
 def main():
     group = options['group']
+    subgroup = options['subgroup']
     raster = options['raster']
     output = options['output']
     coords = options['coordinates']
@@ -226,7 +231,10 @@
     # get data from group listing and set the x-axis labels
     if group:
         # Parse the group list output
-        s = gcore.read_command('i.group', flags='g', group=group, quiet=True)
+        if subgroup:
+            s = gcore.read_command('i.group', flags='g', group=group, subgroup=subgroup, quiet=True)
+        else:
+            s = gcore.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



More information about the grass-commit mailing list