[GRASS-SVN] r36553 - grass/trunk/scripts/v.centroids
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Mar 31 17:26:43 EDT 2009
Author: neteler
Date: 2009-03-31 17:26:43 -0400 (Tue, 31 Mar 2009)
New Revision: 36553
Modified:
grass/trunk/scripts/v.centroids/v.centroids.py
Log:
Don't use locale dependent output for parsing (untested)
Modified: grass/trunk/scripts/v.centroids/v.centroids.py
===================================================================
--- grass/trunk/scripts/v.centroids/v.centroids.py 2009-03-31 21:22:40 UTC (rev 36552)
+++ grass/trunk/scripts/v.centroids/v.centroids.py 2009-03-31 21:26:43 UTC (rev 36553)
@@ -78,8 +78,8 @@
num_bound = 0
tenv = os.environ.copy()
tenv['LC_ALL'] = 'C'
- lines = grass.read_command("v.info", map = options['input'], env = tenv).splitlines()
- e = re.compile("Number of boundaries: +([0-9]+) +")
+ lines = grass.read_command("v.info -t", map = options['input'], env = tenv).splitlines()
+ e = re.compile("boundaries= +([0-9]+) +")
for line in lines:
mo = e.search(line)
if mo:
More information about the grass-commit
mailing list