Parcourir la source

r.out.xyz: separator default to space because | is not allowed (but why?)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60569 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho il y a 11 ans
Parent
commit
af8605c917
1 fichiers modifiés avec 7 ajouts et 3 suppressions
  1. 7 3
      scripts/r.out.xyz/r.out.xyz.py

+ 7 - 3
scripts/r.out.xyz/r.out.xyz.py

@@ -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 @@ def main():
     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)