[GRASS-SVN] r60906 - sandbox/annakrat/r3.flow
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jun 20 13:13:06 PDT 2014
Author: annakrat
Date: 2014-06-20 13:13:06 -0700 (Fri, 20 Jun 2014)
New Revision: 60906
Modified:
sandbox/annakrat/r3.flow/r3.flow.py
Log:
r3.flow: fix creating seeds
Modified: sandbox/annakrat/r3.flow/r3.flow.py
===================================================================
--- sandbox/annakrat/r3.flow/r3.flow.py 2014-06-20 19:04:51 UTC (rev 60905)
+++ sandbox/annakrat/r3.flow/r3.flow.py 2014-06-20 20:13:06 UTC (rev 60906)
@@ -130,6 +130,7 @@
map_info = grast3d.raster3d_info(v_x)
elif options['input']:
+ gcore.info(_("Computing gradient field..."))
array = garray.array3d()
array.read(mapname=options['input'])
velocity = compute_gradient(array)
@@ -178,9 +179,9 @@
for r in range(map_info['rows'], 0, -1):
for c in range(0, map_info['cols']):
for d in range(0, map_info['depths']):
- x = c * map_info['ewres'] + map_info['ewres'] / 2
- y = r * map_info['nsres'] + map_info['nsres'] / 2
- z = d * map_info['tbres'] + map_info['tbres'] / 2
+ x = map_info['west'] + c * map_info['ewres'] + map_info['ewres'] / 2
+ y = map_info['south'] + r * map_info['nsres'] + map_info['nsres'] / 2
+ z = map_info['bottom'] + d * map_info['tbres'] + map_info['tbres'] / 2
seed = Seed(x, y, z, False, False)
if options['flowaccumulation']:
More information about the grass-commit
mailing list