From d79b4910118f5e4a22bfb485ed68fdd2b90f68b6 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Wed, 25 Oct 2023 09:51:24 +0200 Subject: [PATCH] [App/U/GeoTools] Evaluate function in cell center --- Applications/Utils/GeoTools/addDataToRaster.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Applications/Utils/GeoTools/addDataToRaster.cpp b/Applications/Utils/GeoTools/addDataToRaster.cpp index ea0366bf96b..486d829f4f0 100644 --- a/Applications/Utils/GeoTools/addDataToRaster.cpp +++ b/Applications/Utils/GeoTools/addDataToRaster.cpp @@ -198,8 +198,9 @@ int main(int argc, char* argv[]) { for (std::size_t c = 0; c < header.n_cols; c++) { - GeoLib::Point const p{{origin[0] + header.cell_size * c, - origin[1] + header.cell_size * r, 0.0}}; + GeoLib::Point const p{{origin[0] + header.cell_size * (c + 0.5), + origin[1] + header.cell_size * (r + 0.5), + 0.0}}; if (!aabb.containsPoint(p, std::numeric_limits<double>::epsilon())) { continue; -- GitLab