aboutsummaryrefslogtreecommitdiff
path: root/src/transformations/hgridshift.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-01-06 23:03:29 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-01-07 02:24:36 +0100
commiteafeb61ce59aeb34dabf38f55f70ba9a3b779c4b (patch)
treee59f2ce1e7eddc234eba44c6b378bd8c98f34659 /src/transformations/hgridshift.cpp
parent19841f21f4319297b399bdc4f20c1c546a35e10e (diff)
downloadPROJ-eafeb61ce59aeb34dabf38f55f70ba9a3b779c4b.tar.gz
PROJ-eafeb61ce59aeb34dabf38f55f70ba9a3b779c4b.zip
Grid refactoring: address review comments of https://github.com/OSGeo/PROJ/pull/1777
- Move content of legacy apply_gridshift.cpp and apply_vgridshift.cpp in grids.cpp - Rename nad_ functions to pj_hgrid_ - Rename internal proj_hgrid_/proj_vgrid_ functions to pj_
Diffstat (limited to 'src/transformations/hgridshift.cpp')
-rw-r--r--src/transformations/hgridshift.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/transformations/hgridshift.cpp b/src/transformations/hgridshift.cpp
index 24da4dde..122a7ab2 100644
--- a/src/transformations/hgridshift.cpp
+++ b/src/transformations/hgridshift.cpp
@@ -28,7 +28,7 @@ static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) {
if ( Q->defer_grid_opening ) {
Q->defer_grid_opening = false;
- Q->grids = proj_hgrid_init(P, "grids");
+ Q->grids = pj_hgrid_init(P, "grids");
if ( proj_errno(P) ) {
return proj_coord_error().xyz;
}
@@ -37,7 +37,7 @@ static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) {
if (!Q->grids.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, Q->grids, point.lp, PJ_FWD);
+ point.lp = pj_hgrid_apply(P->ctx, Q->grids, point.lp, PJ_FWD);
}
return point.xyz;
@@ -51,7 +51,7 @@ static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) {
if ( Q->defer_grid_opening ) {
Q->defer_grid_opening = false;
- Q->grids = proj_hgrid_init(P, "grids");
+ Q->grids = pj_hgrid_init(P, "grids");
if ( proj_errno(P) ) {
return proj_coord_error().lpz;
}
@@ -60,7 +60,7 @@ static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) {
if (!Q->grids.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, Q->grids, point.lp, PJ_INV);
+ point.lp = pj_hgrid_apply(P->ctx, Q->grids, point.lp, PJ_INV);
}
return point.lpz;
@@ -165,7 +165,7 @@ PJ *TRANSFORMATION(hgridshift,0) {
Q->defer_grid_opening = true;
}
else {
- Q->grids = proj_hgrid_init(P, "grids");
+ Q->grids = pj_hgrid_init(P, "grids");
/* Was gridlist compiled properly? */
if ( proj_errno(P) ) {
proj_log_error(P, "hgridshift: could not find required grid(s).");