aboutsummaryrefslogtreecommitdiff
path: root/src/transformations
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-02-20 11:02:53 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-02-20 11:02:53 +0100
commitb08b9580ab0aca70c8762b3f8f0039484ddaca60 (patch)
tree3cf3ba4103f23abdbaf2dad9fb9f451da5f61b25 /src/transformations
parentf6232db745af1acd2473f51f82d006372c04fc55 (diff)
downloadPROJ-b08b9580ab0aca70c8762b3f8f0039484ddaca60.tar.gz
PROJ-b08b9580ab0aca70c8762b3f8f0039484ddaca60.zip
vgridshift: propagate multiplier to avoid false-positive detection of nodata values in the grids with US VERTCON grids that are in millimeters
Diffstat (limited to 'src/transformations')
-rw-r--r--src/transformations/deformation.cpp2
-rw-r--r--src/transformations/vgridshift.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/transformations/deformation.cpp b/src/transformations/deformation.cpp
index c28e1489..0e0d641c 100644
--- a/src/transformations/deformation.cpp
+++ b/src/transformations/deformation.cpp
@@ -92,7 +92,7 @@ static PJ_XYZ get_grid_shift(PJ* P, PJ_XYZ cartesian) {
/* look up correction values in grids */
shift.lp = proj_hgrid_value(P, geodetic.lp);
- shift.enu.u = proj_vgrid_value(P, geodetic.lp);
+ shift.enu.u = proj_vgrid_value(P, geodetic.lp, 1.0);
if (proj_errno(P) == PJD_ERR_GRID_AREA)
proj_log_debug(P, "deformation: coordinate (%.3f, %.3f) outside deformation model",
diff --git a/src/transformations/vgridshift.cpp b/src/transformations/vgridshift.cpp
index fda38ec3..664010b8 100644
--- a/src/transformations/vgridshift.cpp
+++ b/src/transformations/vgridshift.cpp
@@ -26,7 +26,7 @@ static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) {
if (P->vgridlist_geoid != nullptr) {
/* Only try the gridshift if at least one grid is loaded,
* otherwise just pass the coordinate through unchanged. */
- point.xyz.z += Q->forward_multiplier * proj_vgrid_value(P, point.lp);
+ point.xyz.z += Q->forward_multiplier * proj_vgrid_value(P, point.lp, Q->forward_multiplier);
}
return point.xyz;
@@ -41,7 +41,7 @@ static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) {
if (P->vgridlist_geoid != nullptr) {
/* Only try the gridshift if at least one grid is loaded,
* otherwise just pass the coordinate through unchanged. */
- point.xyz.z -= Q->forward_multiplier * proj_vgrid_value(P, point.lp);
+ point.xyz.z -= Q->forward_multiplier * proj_vgrid_value(P, point.lp, Q->forward_multiplier);
}
return point.lpz;