[GRASS-SVN] r44448 - grass/branches/develbranch_6/scripts/r.blend
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 27 03:30:42 EST 2010
Author: mmetz
Date: 2010-11-27 00:30:42 -0800 (Sat, 27 Nov 2010)
New Revision: 44448
Modified:
grass/branches/develbranch_6/scripts/r.blend/r.blend
Log:
update code comment, speed up
Modified: grass/branches/develbranch_6/scripts/r.blend/r.blend
===================================================================
--- grass/branches/develbranch_6/scripts/r.blend/r.blend 2010-11-27 08:21:41 UTC (rev 44447)
+++ grass/branches/develbranch_6/scripts/r.blend/r.blend 2010-11-27 08:30:42 UTC (rev 44448)
@@ -77,12 +77,12 @@
PERC_INV=`expr 100 - $GIS_OPT_PERCENT`
g.message "Calculating the three component maps..."
-r.mapcalc "$GIS_OPT_OUTPUT.r = r#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + (1.0 - .$GIS_OPT_PERCENT) * r#$GIS_OPT_SECOND"
-r.mapcalc "$GIS_OPT_OUTPUT.g = g#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + (1.0 - .$GIS_OPT_PERCENT) * g#$GIS_OPT_SECOND"
-r.mapcalc "$GIS_OPT_OUTPUT.b = b#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + (1.0 - .$GIS_OPT_PERCENT) * b#$GIS_OPT_SECOND"
+r.mapcalc "$GIS_OPT_OUTPUT.r = r#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + (1.0 - .$GIS_OPT_PERCENT) * r#${GIS_OPT_SECOND}; \
+ $GIS_OPT_OUTPUT.g = g#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + (1.0 - .$GIS_OPT_PERCENT) * g#${GIS_OPT_SECOND}; \
+ $GIS_OPT_OUTPUT.b = b#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + (1.0 - .$GIS_OPT_PERCENT) * b#$GIS_OPT_SECOND"
g.message "Setting color tables to grey..."
-# should this be "0 black \n 255 white"?
+# this must be "0 black \n 255 white"
for MAP in r g b ; do
r.colors map=${GIS_OPT_OUTPUT}.$MAP col=grey255
r.support map=${GIS_OPT_OUTPUT}.$MAP title="Color blend of $GIS_OPT_FIRST and $GIS_OPT_SECOND" \
More information about the grass-commit
mailing list