[GRASS-SVN] r69964 - grass-addons/grass7/raster/r.green/r.green.hydro/libhydro

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 1 09:09:56 PST 2016


Author: Giulia
Date: 2016-12-01 09:09:56 -0800 (Thu, 01 Dec 2016)
New Revision: 69964

Modified:
   grass-addons/grass7/raster/r.green/r.green.hydro/libhydro/plant.py
Log:
r.green: fix bug

Modified: grass-addons/grass7/raster/r.green/r.green.hydro/libhydro/plant.py
===================================================================
--- grass-addons/grass7/raster/r.green/r.green.hydro/libhydro/plant.py	2016-12-01 16:50:25 UTC (rev 69963)
+++ grass-addons/grass7/raster/r.green/r.green.hydro/libhydro/plant.py	2016-12-01 17:09:56 UTC (rev 69964)
@@ -40,8 +40,9 @@
     """ add a column with energy potential (MWh) given the
     output file and the name of the column with the power (kW), n is
     the number of working hours"""
-    new_col = 'E_potMWh double precision'
-    gcore.run_command('v.db.addcolumn', map=vect, columns=new_col)
+    new_col = 'E_potMWh'
+    gcore.run_command('v.db.addcolumn', map=vect,
+                      columns='%s double precision' % new_col)
     gcore.run_command('v.db.update', map=vect, layer=1, column=new_col,
                       query_column='%s * %f' % (power, n/1000.0))
     gcore.run_command('v.build', map=vect)



More information about the grass-commit mailing list