[GRASS-SVN] r52772 - grass/branches/develbranch_6/raster/r.mapcalc

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 20 06:13:14 PDT 2012


Author: neteler
Date: 2012-08-20 06:13:13 -0700 (Mon, 20 Aug 2012)
New Revision: 52772

Modified:
   grass/branches/develbranch_6/raster/r.mapcalc/xcoor3.c
Log:
Fixed wrong z() coordinate computation. Since the depth counts from bottom to top, the z-coordinate should do the same (backport from trunk, r52769)

Modified: grass/branches/develbranch_6/raster/r.mapcalc/xcoor3.c
===================================================================
--- grass/branches/develbranch_6/raster/r.mapcalc/xcoor3.c	2012-08-20 13:12:53 UTC (rev 52771)
+++ grass/branches/develbranch_6/raster/r.mapcalc/xcoor3.c	2012-08-20 13:13:13 UTC (rev 52772)
@@ -69,7 +69,7 @@
     if (argt[0] != DCELL_TYPE)
 	return E_RES_TYPE;
 
-    z = window->top - (current_depth + 0.5) * window->tb_res;
+    z = window->bottom + ((current_depth) + 0.5) * window->tb_res;
 
     for (i = 0; i < columns; i++)
 	res[i] = z;



More information about the grass-commit mailing list