[GRASS-SVN] r71836 - grass-addons/grass7/vector/v.gsflow.export
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 25 17:38:25 PST 2017
Author: awickert
Date: 2017-11-25 17:38:25 -0800 (Sat, 25 Nov 2017)
New Revision: 71836
Modified:
grass-addons/grass7/vector/v.gsflow.export/v.gsflow.export.py
Log:
v.gsflow.export: multiple b.c. points allowed
Modified: grass-addons/grass7/vector/v.gsflow.export/v.gsflow.export.py
===================================================================
--- grass-addons/grass7/vector/v.gsflow.export/v.gsflow.export.py 2017-11-26 01:37:38 UTC (rev 71835)
+++ grass-addons/grass7/vector/v.gsflow.export/v.gsflow.export.py 2017-11-26 01:38:25 UTC (rev 71836)
@@ -262,6 +262,11 @@
outfile = file(out_pour_point_boundary+'.txt', 'a')
_xys = np.squeeze(gscript.db_select(sql='SELECT row,col FROM '+
bc_cell))
+ # if only one point (so was on N-S, W-E direct connection),
+ # expand dimensions so code below works
+ if _xys.ndim < 2:
+ _xys = np.expand_dims(_xys, axis=0)
+ print _xys
for _cell_coords in _xys:
_y, _x = _cell_coords
outstr = 'boundary_condition_pt: row_i '+_y+' col_i '+_x
More information about the grass-commit
mailing list