[GRASS-SVN] r71515 - in grass-addons/grass7/vector: v.gsflow.segments v.stream.network
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Sep 30 14:56:13 PDT 2017
Author: awickert
Date: 2017-09-30 14:56:12 -0700 (Sat, 30 Sep 2017)
New Revision: 71515
Modified:
grass-addons/grass7/vector/v.gsflow.segments/v.gsflow.segments.py
grass-addons/grass7/vector/v.stream.network/v.stream.network.py
Log:
Offmap flow "tostream" = 0
Modified: grass-addons/grass7/vector/v.gsflow.segments/v.gsflow.segments.py
===================================================================
--- grass-addons/grass7/vector/v.gsflow.segments/v.gsflow.segments.py 2017-09-28 20:14:17 UTC (rev 71514)
+++ grass-addons/grass7/vector/v.gsflow.segments/v.gsflow.segments.py 2017-09-30 21:56:12 UTC (rev 71515)
@@ -292,7 +292,8 @@
cur.executemany("update "+segments+" set ISEG=? where cat=?", nseg_cats)
cur.executemany("update "+segments+" set NSEG=? where cat=?", nseg_cats)
- # outseg = tostream
+ # outseg = tostream: default is 0 if "tostream" is off-map
+ cur.execute("update "+segments+" set OUTSEG=0")
cur.executemany("update "+segments+" set OUTSEG=? where tostream=?", nseg_cats)
# Discharge and hydraulic geometry
Modified: grass-addons/grass7/vector/v.stream.network/v.stream.network.py
===================================================================
--- grass-addons/grass7/vector/v.stream.network/v.stream.network.py 2017-09-28 20:14:17 UTC (rev 71514)
+++ grass-addons/grass7/vector/v.stream.network/v.stream.network.py 2017-09-30 21:56:12 UTC (rev 71515)
@@ -191,7 +191,9 @@
# We will update the database with it.
streamsTopo.build()
streamsTopo.open('rw')
- cur = streamsTopo.table.conn.cursor()\
+ cur = streamsTopo.table.conn.cursor()
+ # Default to 0 if no stream flows to it
+ cur.executemany("update "+segments+" set tostream=0", nseg_cats)
# use "executemany" ????????????????????????????????????????????????????
# see v.gsflow.segments.py
for i in range(len(tocat)):
More information about the grass-commit
mailing list