[GRASS-SVN] r73126 - grass-addons/grass7/display/d.vect.colhist

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 21 01:59:30 PDT 2018


Author: mlennert
Date: 2018-08-21 01:59:30 -0700 (Tue, 21 Aug 2018)
New Revision: 73126

Modified:
   grass-addons/grass7/display/d.vect.colhist/d.vect.colhist.py
Log:
d.vect.colhist: add layer parameter, also for GUI table button for where parameter

Modified: grass-addons/grass7/display/d.vect.colhist/d.vect.colhist.py
===================================================================
--- grass-addons/grass7/display/d.vect.colhist/d.vect.colhist.py	2018-08-20 12:28:56 UTC (rev 73125)
+++ grass-addons/grass7/display/d.vect.colhist/d.vect.colhist.py	2018-08-21 08:59:30 UTC (rev 73126)
@@ -20,6 +20,8 @@
 #%end
 #%option G_OPT_V_MAP
 #%end
+#%option G_OPT_V_FIELD
+#%end
 #%option G_OPT_DB_COLUMN
 #% key: column
 #% description: Attribute column containing azimuth
@@ -51,6 +53,7 @@
 
 def main():
     vector = options['map']
+    layer = options['layer']
     column = options['column']
     bins = int(options['bins'])
     plot_output = options['plot_output']
@@ -59,6 +62,7 @@
     if where:
         data=[float(x) for x in gscript.read_command('v.db.select',
                                                      map_=vector,
+                                                     layer=layer,
                                                      column=column,
                                                      where=where,
                                                      flags='c').splitlines()]
@@ -65,6 +69,7 @@
     else:
         data=[float(x) for x in gscript.read_command('v.db.select',
                                                      map_=vector,
+                                                     layer=layer,
                                                      column=column,
                                                      flags='c').splitlines()]
    



More information about the grass-commit mailing list