diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-12-05 01:03:46 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-12-06 21:35:14 +0100 |
| commit | 6875ef7116b9dab4021afeb06e2b79cd5679743b (patch) | |
| tree | 8863c3547cb75456c818c835e0bc016a6bc0cbe1 /src/transformations/hgridshift.cpp | |
| parent | 126384854bf8e1b7461aebcc28966a6559971de1 (diff) | |
| download | PROJ-6875ef7116b9dab4021afeb06e2b79cd5679743b.tar.gz PROJ-6875ef7116b9dab4021afeb06e2b79cd5679743b.zip | |
horizontal grid shift: rework to no longer load whole grid into memory
Diffstat (limited to 'src/transformations/hgridshift.cpp')
| -rw-r--r-- | src/transformations/hgridshift.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/transformations/hgridshift.cpp b/src/transformations/hgridshift.cpp index 90633939..465bfe98 100644 --- a/src/transformations/hgridshift.cpp +++ b/src/transformations/hgridshift.cpp @@ -20,7 +20,7 @@ static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) { PJ_COORD point = {{0,0,0,0}}; point.lpz = lpz; - if (P->gridlist != nullptr) { + if (!P->hgrids.empty()) { /* Only try the gridshift if at least one grid is loaded, * otherwise just pass the coordinate through unchanged. */ point.lp = proj_hgrid_apply(P, point.lp, PJ_FWD); @@ -34,7 +34,7 @@ static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) { PJ_COORD point = {{0,0,0,0}}; point.xyz = xyz; - if (P->gridlist != nullptr) { + if (!P->hgrids.empty()) { /* Only try the gridshift if at least one grid is loaded, * otherwise just pass the coordinate through unchanged. */ point.lp = proj_hgrid_apply(P, point.lp, PJ_INV); |
