[GRASS-SVN] r60905 - sandbox/annakrat/r3.flow
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jun 20 12:04:52 PDT 2014
Author: annakrat
Date: 2014-06-20 12:04:51 -0700 (Fri, 20 Jun 2014)
New Revision: 60905
Modified:
sandbox/annakrat/r3.flow/r3.flow.py
Log:
r3.flow: update needed after fixes in pygrass
Modified: sandbox/annakrat/r3.flow/r3.flow.py
===================================================================
--- sandbox/annakrat/r3.flow/r3.flow.py 2014-06-20 17:35:56 UTC (rev 60904)
+++ sandbox/annakrat/r3.flow/r3.flow.py 2014-06-20 19:04:51 UTC (rev 60905)
@@ -194,8 +194,9 @@
# read seed points
inp_seeds = VectorTopo(options['seed_points'])
inp_seeds.open()
+ if not inp_seeds.is_3D():
+ gcore.fatal(_("Input vector map of seed points must be 3D."))
for point in inp_seeds:
- point.is2D = False # just a workaround
seeds.append(Seed(point.x, point.y, point.z, flowaccum=False, flowline=True))
inp_seeds.close()
@@ -204,7 +205,7 @@
flowline_vector = VectorTopo(options['flowline'])
if flowline_vector.exist() and not gcore.overwrite:
gcore.fatal(_("Vector map <{flowline}> already exists.").format(flowline=flowline_vector))
- flowline_vector.open('w')
+ flowline_vector.open(mode='w', with_z=True)
# create the flowaccumulation 3D raster
if options['flowaccumulation']:
@@ -253,7 +254,6 @@
if seed.flowline and len(line) > 1:
# workaround for pygrass bug
- line.is2D = False
flowline_vector.write(line)
gcore.verbose(_("Flowline ended after %s steps") % (count - 1))
More information about the grass-commit
mailing list