From 126384854bf8e1b7461aebcc28966a6559971de1 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 4 Dec 2019 18:56:15 +0100 Subject: vertical grid shift: rework to no longer load whole grid into memory --- src/transformations/vgridshift.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/transformations/vgridshift.cpp') diff --git a/src/transformations/vgridshift.cpp b/src/transformations/vgridshift.cpp index de0cdd8c..51f129ab 100644 --- a/src/transformations/vgridshift.cpp +++ b/src/transformations/vgridshift.cpp @@ -22,7 +22,7 @@ static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) { PJ_COORD point = {{0,0,0,0}}; point.lpz = lpz; - if (P->vgridlist_geoid != nullptr) { + if (!P->vgrids.empty()) { /* Only try the gridshift if at least one grid is loaded, * otherwise just pass the coordinate through unchanged. */ point.xyz.z += proj_vgrid_value(P, point.lp, Q->forward_multiplier); @@ -37,7 +37,7 @@ static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) { PJ_COORD point = {{0,0,0,0}}; point.xyz = xyz; - if (P->vgridlist_geoid != nullptr) { + if (!P->vgrids.empty()) { /* Only try the gridshift if at least one grid is loaded, * otherwise just pass the coordinate through unchanged. */ point.xyz.z -= proj_vgrid_value(P, point.lp, Q->forward_multiplier); -- cgit v1.2.3