[GRASS-SVN] r60569 - grass/trunk/scripts/r.out.xyz
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 28 17:26:42 PDT 2014
Author: hcho
Date: 2014-05-28 17:26:42 -0700 (Wed, 28 May 2014)
New Revision: 60569
Modified:
grass/trunk/scripts/r.out.xyz/r.out.xyz.py
Log:
r.out.xyz: separator default to space because | is not allowed (but why?)
Modified: grass/trunk/scripts/r.out.xyz/r.out.xyz.py
===================================================================
--- grass/trunk/scripts/r.out.xyz/r.out.xyz.py 2014-05-28 21:52:12 UTC (rev 60568)
+++ grass/trunk/scripts/r.out.xyz/r.out.xyz.py 2014-05-29 00:26:42 UTC (rev 60569)
@@ -4,12 +4,12 @@
# MODULE: r.out.xyz
# AUTHOR: M. Hamish Bowman, Dept. Marine Science, Otago Univeristy,
# New Zealand
-# Converted to Python by Glynn Clements
+# Converted to Python by Glynn Clements
# PURPOSE: Export a raster map as x,y,z values based on cell centers
# This is a simple wrapper script for "r.stats -1ng"
#
# COPYRIGHT: (c) 2006 Hamish Bowman, and the GRASS Development Team
-# (c) 2008 Glynn Clements, and the GRASS Development Team
+# (c) 2008 Glynn Clements, and the GRASS Development Team
# This program is free software under the GNU General Public
# License (>=v2). Read the file COPYING that comes with GRASS
# for details.
@@ -31,6 +31,7 @@
#% required: no
#%end
#%option G_OPT_F_SEP
+#% answer: space
#%end
import sys
@@ -47,7 +48,10 @@
if output:
parameters.update(output=output)
# windows don't like pipe so we don't include it in the command explicitly
- if sep != '|':
+ if sep == '|':
+ grass.warning(_("Separator '|' is not allowed. Using a space."))
+ # but why?
+ else:
parameters.update(separator=sep)
ret = grass.run_command("r.stats", **parameters)
More information about the grass-commit
mailing list