Browse Source

Fixed wrong z() coordinate computation. Since the depth counts from bottom to top, the z-coordinate should do the same.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52769 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 12 years ago
parent
commit
68d78212ed
1 changed files with 1 additions and 1 deletions
  1. 1 1
      raster/r.mapcalc/xcoor3.c

+ 1 - 1
raster/r.mapcalc/xcoor3.c

@@ -69,7 +69,7 @@ int f_z(int argc, const int *argt, void **args)
     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;