[GRASS-SVN] r63310 - grass-addons/grass7/vector/v.habitat.dem

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 1 02:56:17 PST 2014


Author: hellik
Date: 2014-12-01 02:56:17 -0800 (Mon, 01 Dec 2014)
New Revision: 63310

Modified:
   grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py
Log:
v.habitat.dem: update to new module option syntax (r.coin, v.db.join, db.in.ogr)

Modified: grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py
===================================================================
--- grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py	2014-12-01 10:49:05 UTC (rev 63309)
+++ grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py	2014-12-01 10:56:17 UTC (rev 63310)
@@ -396,8 +396,8 @@
     grass.message( "10 - depression" )
     grass.message( " " )
     grass.message( "Mutual occurrence in percent of the row" )	
-    grass.run_command("r.coin", map1 = r_habitat,
-                                     map2 = r_geomorphon,
+    grass.run_command("r.coin", first = r_habitat,
+                                     second = r_geomorphon,
                                      flags = 'w',
                                      units = 'y')
     grass.message( "Calculations of mutual occurrences done." )
@@ -413,7 +413,7 @@
                                      separator = ';',
                                      output = habgeocsv)	
 
-    grass.run_command("db.in.ogr", dsn = habgeocsv,
+    grass.run_command("db.in.ogr", input = habgeocsv,
                                      output = t_habitat_geomorphons)
 
     grass.run_command("db.dropcolumn", table = t_habitat_geomorphons,
@@ -430,13 +430,13 @@
                                      output = habgeocsv_pivot,	
                                      sql = "SELECT field_1, sum(case when field_4 = 'flat' then field_5 end) as flat, sum(case when field_4 = 'summit' then field_5 end) as summit, sum(case when field_4 = 'ridge' then field_5 end) as ridge, sum(case when field_4 = 'shoulder' then field_5 end) as shoulder, sum(case when field_4 = 'spur' then field_5 end) as spur, sum(case when field_4 = 'slope' then field_5 end) as slope, sum(case when field_4 = 'hollow' then field_5 end) as hollow, sum(case when field_4 = 'footslope' then field_5 end) as footslope, sum(case when field_4 = 'valley' then field_5 end) as valley, sum(case when field_4 = 'depression' then field_5 end) as depression , sum(field_5) as SubTotal FROM %s GROUP BY field_1" % t_habitat_geomorphons)
 
-    grass.run_command("db.in.ogr", dsn = habgeocsv_pivot,
+    grass.run_command("db.in.ogr", input = habgeocsv_pivot,
                                      output = t_habitat_geomorphons_pivot)
 
     grass.run_command("v.db.join", map = v_habitat,
                                      column = v_column,
-                                     otable = t_habitat_geomorphons_pivot,
-                                     ocolumn = 'field_1')
+                                     other_table = t_habitat_geomorphons_pivot,
+                                     other_column = 'field_1')
     grass.message( "Geomorphon information joint to habitat attribute table." )
     grass.message( "----" )
 



More information about the grass-commit mailing list