[GRASS-SVN] r67819 - grass-addons/grass7/vector/v.neighborhoodmatrix

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Feb 12 14:34:26 PST 2016


Author: mlennert
Date: 2016-02-12 14:34:26 -0800 (Fri, 12 Feb 2016)
New Revision: 67819

Modified:
   grass-addons/grass7/vector/v.neighborhoodmatrix/v.neighborhoodmatrix.py
Log:
correctly read G_OPT_F_SEP options


Modified: grass-addons/grass7/vector/v.neighborhoodmatrix/v.neighborhoodmatrix.py
===================================================================
--- grass-addons/grass7/vector/v.neighborhoodmatrix/v.neighborhoodmatrix.py	2016-02-12 21:16:38 UTC (rev 67818)
+++ grass-addons/grass7/vector/v.neighborhoodmatrix/v.neighborhoodmatrix.py	2016-02-12 22:34:26 UTC (rev 67819)
@@ -38,22 +38,22 @@
 #%end
 
 import sys
-from grass.script import core as grass
+import grass.script as grass
 
-
 def main():
     # if no output filename, output to stdout
     input = options['input']
     player = int(options['player'])
     output = options['output']
-    sep = options['separator']
+    sep = grass.utils.separator(options['separator'])
     bidirectional = flags['b']
     tempmapname='neighborhoodmatrix_tempmap'
     #TODO: automatically determine the first available layer in file
     blayer = player+1
 
     grass.run_command('v.category', input=input, output=tempmapname,
-            option='add', layer=blayer, type='boundary', quiet=True)
+            option='add', layer=blayer, type='boundary', quiet=True,
+            overwrite=True)
     vtodb_results=grass.read_command('v.to.db', flags='p', map=tempmapname,
             type='boundary', option='sides', layer=blayer, qlayer=player, quiet=True)
     grass.run_command('g.remove', flags='f', type='vector', name=tempmapname, quiet=True)



More information about the grass-commit mailing list