[GRASS-SVN] r62800 - grass/trunk/scripts/r.rgb
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 18 08:52:30 PST 2014
Author: martinl
Date: 2014-11-18 08:52:30 -0800 (Tue, 18 Nov 2014)
New Revision: 62800
Modified:
grass/trunk/scripts/r.rgb/r.rgb.html
grass/trunk/scripts/r.rgb/r.rgb.py
Log:
r.rgb: output_prefix -> basename
Modified: grass/trunk/scripts/r.rgb/r.rgb.html
===================================================================
--- grass/trunk/scripts/r.rgb/r.rgb.html 2014-11-18 16:47:27 UTC (rev 62799)
+++ grass/trunk/scripts/r.rgb/r.rgb.html 2014-11-18 16:52:30 UTC (rev 62800)
@@ -1,7 +1,7 @@
<h2>DESCRIPTION</h2>
-<em>r.rgb</em> is a script that generates separate red, green and blue
-maps from a raster map and its associated color table.
+<em>r.rgb</em> generates separate red, green and blue maps from a
+raster map and its associated color table.
<h2>SEE ALSO</h2>
@@ -16,4 +16,5 @@
Glynn Clements
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>
Modified: grass/trunk/scripts/r.rgb/r.rgb.py
===================================================================
--- grass/trunk/scripts/r.rgb/r.rgb.py 2014-11-18 16:47:27 UTC (rev 62799)
+++ grass/trunk/scripts/r.rgb/r.rgb.py 2014-11-18 16:52:30 UTC (rev 62800)
@@ -20,10 +20,8 @@
#%end
#%option G_OPT_R_INPUT
#%end
-#%option
-#% key: output_prefix
-#% type: string
-#% description: Prefix for output raster maps (default: input)
+#%option G_OPT_R_BASENAME_OUTPUT
+#% description: Default: input
#% required: no
#%end
@@ -31,7 +29,7 @@
def main():
input = options['input']
- output = options['output_prefix']
+ output = options['basename']
if not grass.find_file(input)['file']:
grass.fatal(_("Raster map <%s> not found") % input)
@@ -46,7 +44,7 @@
for ch in ['r', 'g', 'b']:
name = "%s.%s" % (output, ch)
- grass.run_command('r.colors', map = name, color = 'grey255')
+ grass.run_command('r.colors', map = name, color = 'grey255', quiet = True)
grass.raster_history(name)
if __name__ == "__main__":
More information about the grass-commit
mailing list