|
@@ -2,7 +2,7 @@
|
|
############################################################################
|
|
############################################################################
|
|
#
|
|
#
|
|
# MODULE: r.out.xyz
|
|
# MODULE: r.out.xyz
|
|
-# AUTHOR: M. Hamish Bowman, Dept. Marine Science, Otago Univeristy,
|
|
|
|
|
|
+# AUTHOR: M. Hamish Bowman, Dept. Marine Science, Otago University,
|
|
# New Zealand
|
|
# 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
|
|
# PURPOSE: Export a raster map as x,y,z values based on cell centers
|
|
@@ -32,16 +32,26 @@
|
|
#%end
|
|
#%end
|
|
#%option G_OPT_F_SEP
|
|
#%option G_OPT_F_SEP
|
|
#%end
|
|
#%end
|
|
|
|
+#%flag
|
|
|
|
+#% key: i
|
|
|
|
+#% description: Include no data values
|
|
|
|
+#%end
|
|
|
|
|
|
import sys
|
|
import sys
|
|
from grass.script import core as grass
|
|
from grass.script import core as grass
|
|
from grass.exceptions import CalledModuleError
|
|
from grass.exceptions import CalledModuleError
|
|
|
|
|
|
|
|
+
|
|
def main():
|
|
def main():
|
|
# if no output filename, output to stdout
|
|
# if no output filename, output to stdout
|
|
output = options['output']
|
|
output = options['output']
|
|
|
|
+ donodata = flags['i']
|
|
|
|
|
|
- parameters = dict(flags="1gn",
|
|
|
|
|
|
+ if donodata:
|
|
|
|
+ statsflags="1g"
|
|
|
|
+ else:
|
|
|
|
+ statsflags="1gn"
|
|
|
|
+ parameters = dict(flags=statsflags,
|
|
input=options['input'],
|
|
input=options['input'],
|
|
separator=options['separator'])
|
|
separator=options['separator'])
|
|
if output:
|
|
if output:
|