diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/pj_fwd.c | 3 | ||||
| -rw-r--r-- | src/pj_inv.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/pj_fwd.c b/src/pj_fwd.c index b5f1b36e..2ed4c469 100644 --- a/src/pj_fwd.c +++ b/src/pj_fwd.c @@ -114,6 +114,9 @@ static PJ_COORD fwd_finalize (PJ *P, PJ_COORD coo) { if (P->is_geocent) { coo = proj_trans (P->cart, PJ_FWD, coo); } + coo.xyz.x *= P->fr_meter; + coo.xyz.y *= P->fr_meter; + coo.xyz.z *= P->fr_meter; break; diff --git a/src/pj_inv.c b/src/pj_inv.c index ca149674..d1a02bca 100644 --- a/src/pj_inv.c +++ b/src/pj_inv.c @@ -100,8 +100,12 @@ static PJ_COORD inv_prepare (PJ *P, PJ_COORD coo) { /* de-scale and de-offset */ case PJ_IO_UNITS_CARTESIAN: - if (P->is_geocent) + coo.xyz.x *= P->to_meter; + coo.xyz.y *= P->to_meter; + coo.xyz.z *= P->to_meter; + if (P->is_geocent) { coo = proj_trans (P->cart, PJ_INV, coo); + } return coo; |
