diff options
| author | Thomas Knudsen <thokn@sdfe.dk> | 2018-02-01 15:49:30 +0100 |
|---|---|---|
| committer | Thomas Knudsen <thokn@sdfe.dk> | 2018-02-01 15:49:30 +0100 |
| commit | 5c132e5be1a38a0ec018edcec86b3d889d6e33fa (patch) | |
| tree | fa860fcca78d3d4715cd358b9155c9b9409a872d | |
| parent | 8f3345f39afedc3b025613852a54248f170a1b9f (diff) | |
| download | PROJ-5c132e5be1a38a0ec018edcec86b3d889d6e33fa.tar.gz PROJ-5c132e5be1a38a0ec018edcec86b3d889d6e33fa.zip | |
make local derivatives available in PJ_FACTOR
| -rw-r--r-- | src/proj.h | 3 | ||||
| -rw-r--r-- | src/proj_4D_api.c | 12 |
2 files changed, 12 insertions, 3 deletions
@@ -167,6 +167,9 @@ struct P5_FACTORS { /* Common designation */ double tissot_semimajor; /* a */ double tissot_semiminor; /* b */ + + double dx_dlam, dx_dphi; + double dy_dlam, dy_dphi; }; typedef struct P5_FACTORS PJ_FACTORS; diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 2b250398..c91b0786 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -940,11 +940,11 @@ PJ_FACTORS proj_factors(PJ *P, LP lp) { Characteristics include meridian, parallel and areal scales, angular distortion, meridian/parallel, meridian convergence and scale error. - returns PJ_FACTORS. If unsuccessfull error number is set and the returned - struct contains NULL data. + returns PJ_FACTORS. If unsuccessfull, error number is set and the + struct returned contains NULL data. ******************************************************************************/ - PJ_FACTORS factors = {0,0,0, 0,0,0, 0,0}; + PJ_FACTORS factors = {0,0,0, 0,0,0, 0,0, 0,0,0,0}; struct FACTORS f; if (0==P) @@ -964,6 +964,12 @@ PJ_FACTORS proj_factors(PJ *P, LP lp) { factors.tissot_semimajor = f.a; factors.tissot_semiminor = f.b; + /* Raw derivatives, for completeness's sake */ + factors.dx_dlam = f.der.x_l; + factors.dx_dphi = f.der.x_p; + factors.dy_dlam = f.der.y_l; + factors.dy_dphi = f.der.y_p; + return factors; } |
