[GRASS-SVN] r66933 - grass-addons/grass7/vector/v.lidar.mcc
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Nov 25 20:23:08 PST 2015
Author: wenzeslaus
Date: 2015-11-25 20:23:08 -0800 (Wed, 25 Nov 2015)
New Revision: 66933
Modified:
grass-addons/grass7/vector/v.lidar.mcc/v.lidar.mcc.py
Log:
v.lidar.mcc: do not build topology in 7.1
This returns code to state before r66241 for 7.1 except
for the fact that before r66241 it was not working
as v.patch required topology.
Modified: grass-addons/grass7/vector/v.lidar.mcc/v.lidar.mcc.py
===================================================================
--- grass-addons/grass7/vector/v.lidar.mcc/v.lidar.mcc.py 2015-11-26 02:19:37 UTC (rev 66932)
+++ grass-addons/grass7/vector/v.lidar.mcc/v.lidar.mcc.py 2015-11-26 04:23:08 UTC (rev 66933)
@@ -185,7 +185,19 @@
# controls first creation of the output map before patching
ng_output_exists = False
+ # append and do not build topology
+ vpatch_flags = 'ab'
+ # 7.x requires topology to see z coordinate
+ # 7.1 v.patch has flags to use z even without topology
+ # see #2433 on Trac and r66822 in Subversion
+ build_before_patch = True
+ unused, gver_minor, unused = grass.version()['version'].split('.')
+ if int(gver_minor) >= 1:
+ build_before_patch = False
+ # do not expect topology and expect z
+ vpatch_flags += 'nz'
+
# Loop through scale domaines
while ( l <= l_stop ) :
i = 1
@@ -235,10 +247,12 @@
# Set convergence level
if ( nc > 0 ) :
convergence = float( float(ng) / float(nc) )
- grass.run_command('v.build', map=temp_ng, stderr=nuldev)
+ if build_before_patch:
+ grass.run_command('v.build', map=temp_ng, stderr=nuldev)
# Patch non-ground points to non-ground output map
if ng_output_exists:
- grass.run_command('v.patch', input=temp_ng, output=ng_output, flags="ab",
+ grass.run_command('v.patch', input=temp_ng,
+ output=ng_output, flags=vpatch_flags,
overwrite=True, quiet=True, stderr=nuldev)
else:
grass.run_command('g.copy', vector=(temp_ng, ng_output), stderr=nuldev)
More information about the grass-commit
mailing list