浏览代码

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 年之前
父节点
当前提交
68d78212ed
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;