diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-02-20 11:02:53 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-02-20 11:02:53 +0100 |
| commit | b08b9580ab0aca70c8762b3f8f0039484ddaca60 (patch) | |
| tree | 3cf3ba4103f23abdbaf2dad9fb9f451da5f61b25 /src/transformations | |
| parent | f6232db745af1acd2473f51f82d006372c04fc55 (diff) | |
| download | PROJ-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.cpp | 2 | ||||
| -rw-r--r-- | src/transformations/vgridshift.cpp | 4 |
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; |
