Hi,
i.landsat.rgb -p fails for me with maps created with i.fusion.brovey:
line 138: [: 47.9603: integer expression expected
[...]
Attached you find the small changes that make it work at least for me again.
Regards,
Otto
Index: scripts/i.landsat.rgb/i.landsat.rgb
===================================================================
--- scripts/i.landsat.rgb/i.landsat.rgb (Revision 29915)
+++ scripts/i.landsat.rgb/i.landsat.rgb (Arbeitskopie)
@@ -117,8 +117,8 @@
if [ 0 -eq $GIS_FLAG_P ] ; then
for i in $RED $GREEN $BLUE ; do
g.message "Processing [$i] .."
- MIN=`r.univar -ge $i perc=2 | grep "^percentile_" | cut -d'=' -f2`
- MAX=`r.univar -ge $i perc=$BRIGHTNESS | grep "^percentile_" | cut -d'=' -f2`
+ MIN=`r.univar -ge $i perc=2 | grep "^percentile_" | awk -F'=' '{printf "%i\n", $2}'`
+ MAX=`r.univar -ge $i perc=$BRIGHTNESS | grep "^percentile_" | awk -F'=' '{printf "%i\n", $2}'`
#echo "[$i]: min=$MIN max=$MAX"
r.colors $i col=rules << EOF
0% black
@@ -132,8 +132,8 @@
ALL_MIN=255
for i in $RED $GREEN $BLUE ; do
g.message "Processing [$i] .."
- MIN=`r.univar -ge $i perc=2 | grep "^percentile_" | cut -d'=' -f2`
- MAX=`r.univar -ge $i perc=$BRIGHTNESS | grep "^percentile_" | cut -d'=' -f2`
+ MIN=`r.univar -ge $i perc=2 | grep "^percentile_" | awk -F'=' '{printf "%i\n", $2}'`
+ MAX=`r.univar -ge $i perc=$BRIGHTNESS | grep "^percentile_" | awk -F'=' '{printf "%i\n", $2}'`
#echo "[$i]: min=$MIN max=$MAX"
if [ $MAX -gt $ALL_MAX ] ; then
ALL_MAX=$MAX
@@ -159,3 +159,4 @@
r.support ${GIS_OPT_RED} history="${CMDLINE}"
exit 0
+
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev