[GRASS-SVN] r29662 - in grass/trunk/scripts: i.fusion.brovey
i.in.spotvgt
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jan 11 09:15:18 EST 2008
Author: neteler
Date: 2008-01-11 09:15:18 -0500 (Fri, 11 Jan 2008)
New Revision: 29662
Modified:
grass/trunk/scripts/i.fusion.brovey/i.fusion.brovey
grass/trunk/scripts/i.in.spotvgt/i.in.spotvgt
Log:
Ivan Shmakov <oneingray gmail com>: use WIND_OVERRIDE
Modified: grass/trunk/scripts/i.fusion.brovey/i.fusion.brovey
===================================================================
--- grass/trunk/scripts/i.fusion.brovey/i.fusion.brovey 2008-01-10 20:12:31 UTC (rev 29661)
+++ grass/trunk/scripts/i.fusion.brovey/i.fusion.brovey 2008-01-11 14:15:18 UTC (rev 29662)
@@ -118,8 +118,6 @@
cleanup()
{
- #restore settings:
- g.region region=i.fusion.brovey.$TMP
g.remove region=i.fusion.brovey.$TMP > /dev/null
}
@@ -137,10 +135,12 @@
exit 1
fi
-#save current settings:
+# clone current region
g.region save=i.fusion.brovey.$TMP > /dev/null
+WIND_OVERRIDE=i.fusion.brovey.$TMP
+export WIND_OVERRIDE
-g.message message="Temporarily setting raster resolution to PAN resolution: $PANRES"
+# set the resolution
g.region res=$PANRES -ap > /dev/null
g.message "Performing Brovey transformation..."
Modified: grass/trunk/scripts/i.in.spotvgt/i.in.spotvgt
===================================================================
--- grass/trunk/scripts/i.in.spotvgt/i.in.spotvgt 2008-01-10 20:12:31 UTC (rev 29661)
+++ grass/trunk/scripts/i.in.spotvgt/i.in.spotvgt 2008-01-11 14:15:18 UTC (rev 29662)
@@ -200,8 +200,10 @@
# Coefficient a = 0.004
# Coefficient b = -0.1
-#save region before zoom to SPOT image
-g.region save=spot_$PID 2>&1 >/dev/null
+# switch to a temporary region
+WIND_OVERRIDE=spot_$PID
+export WIND_OVERRIDE
+g.region -d 2>&1 >/dev/null
g.region rast=$NAME 2>&1 >/dev/null
g.message "Remapping digital numbers to NDVI..."
@@ -276,8 +278,7 @@
g.message message="Filtered SPOT VEGETATION NDVI map <${NAME}_filt>."
fi
-# restore user settings:
-g.region region=spot_$PID 2>&1 >/dev/null
+# remove the temporary region
g.remove region=spot_$PID 2>&1 >/dev/null
#### clean up the mess
More information about the grass-commit
mailing list