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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 1 08:50:25 PST 2016


Author: Giulia
Date: 2016-12-01 08:50:25 -0800 (Thu, 01 Dec 2016)
New Revision: 69963

Modified:
   grass-addons/grass7/raster/r.green/r.green.hydro/libhydro/plant.py
Log:
r.green: add double precision to the new column

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 13:20:05 UTC (rev 69962)
+++ grass-addons/grass7/raster/r.green/r.green.hydro/libhydro/plant.py	2016-12-01 16:50:25 UTC (rev 69963)
@@ -40,10 +40,11 @@
     """ 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_potMW'
+    new_col = 'E_potMWh double precision'
     gcore.run_command('v.db.addcolumn', map=vect, columns=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)
 
 
 def closest(number, ndigits=0, resolution=None):



More information about the grass-commit mailing list