|
@@ -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)
|