[GRASS-SVN] r33715 - grass-addons/vector/v.what.rast.buffer

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 7 05:05:11 EDT 2008


Author: hamish
Date: 2008-10-07 05:05:11 -0400 (Tue, 07 Oct 2008)
New Revision: 33715

Modified:
   grass-addons/vector/v.what.rast.buffer/v.what.rast.buffer
Log:
more region fixes for subwindows

Modified: grass-addons/vector/v.what.rast.buffer/v.what.rast.buffer
===================================================================
--- grass-addons/vector/v.what.rast.buffer/v.what.rast.buffer	2008-10-07 09:01:32 UTC (rev 33714)
+++ grass-addons/vector/v.what.rast.buffer/v.what.rast.buffer	2008-10-07 09:05:11 UTC (rev 33715)
@@ -173,7 +173,7 @@
 
 	# create subregion bounds centered on mark so we quickly process
 
-if [ 0 ] ; then
+if [ 0 -eq 1 ] ; then
 	#   only the local area.
 	int_EASTING=`echo $EASTING | cut -f1 -d.`
 	int_NORTHING=`echo $NORTHING | cut -f1 -d.`
@@ -188,10 +188,10 @@
 	g.region n=$R_NORTH s=$R_SOUTH e=$R_EAST w=$R_WEST res=$RES # -p
 else
 	#  alternate method: rely on g.region -a expansion
-	R_NORTH=`echo $($NORTHING + $BUFFER)`
-	R_SOUTH=`echo $($NORTHING - $BUFFER)`
-	R_EAST=`echo $($EASTING + $BUFFER)`
-	R_WEST=`echo $($EASTING - $BUFFER)`
+	R_NORTH=`echo $(($NORTHING + $BUFFER + $RES))`
+	R_SOUTH=`echo $(($NORTHING - $BUFFER - $RES))`
+	R_EAST=`echo $(($EASTING + $BUFFER + $RES))`
+	R_WEST=`echo $(($EASTING - $BUFFER - $RES))`
 
 	# zoom in on local region (for speed)
 	g.region n=$R_NORTH s=$R_SOUTH e=$R_EAST w=$R_WEST res=$RES -a  # -p



More information about the grass-commit mailing list