[GRASS-SVN] r54565 - grass/trunk/scripts/r.reclass.area

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 7 23:41:34 PST 2013


Author: martinl
Date: 2013-01-07 23:41:34 -0800 (Mon, 07 Jan 2013)
New Revision: 54565

Modified:
   grass/trunk/scripts/r.reclass.area/r.reclass.area.py
Log:
r.reclass.area: don't use '|' as separator (fails on Windows)

Modified: grass/trunk/scripts/r.reclass.area/r.reclass.area.py
===================================================================
--- grass/trunk/scripts/r.reclass.area/r.reclass.area.py	2013-01-08 07:18:36 UTC (rev 54564)
+++ grass/trunk/scripts/r.reclass.area/r.reclass.area.py	2013-01-08 07:41:34 UTC (rev 54565)
@@ -101,11 +101,11 @@
     flags = 'aln'
     if grass.raster_info(infile)['datatype'] in ('FCELL', 'DCELL'):
         flags += 'i'
-    p1 = grass.pipe_command('r.stats', flags = flags, input = (clumpfile, infile), sep = '|')
+    p1 = grass.pipe_command('r.stats', flags = flags, input = (clumpfile, infile), sep = ';')
     p2 = grass.feed_command('r.reclass', input = clumpfile, output = recfile, rules = '-')
     rules = ''
     for line in p1.stdout:
-        f = line.rstrip('\r\n').split('|')
+        f = line.rstrip(os.linesep).split(';')
         if len(f) < 5:
             continue
         hectares = float(f[4]) * 0.0001



More information about the grass-commit mailing list