diff options
| author | Thomas Knudsen <busstoptaktik@users.noreply.github.com> | 2018-02-10 23:02:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-10 23:02:47 +0100 |
| commit | 2cca9ead11be47f6efd0ab504cf2e9020b85fa80 (patch) | |
| tree | 17c577bef2e0c38e13b9819f5d882d5587292349 /src/gie.c | |
| parent | c99cf890e3ce13ddc5cfaae092851ccf77182ea3 (diff) | |
| download | PROJ-2cca9ead11be47f6efd0ab504cf2e9020b85fa80.tar.gz PROJ-2cca9ead11be47f6efd0ab504cf2e9020b85fa80.zip | |
Make the 4D API fully 4D (#788)
Make 4D API fully 4D:
Remove PJ_XY, PJ_LP, PJ_XYZ, PJ_LPZ etc. from the API surface and
make all formal parameters of the API fully 4D PJ_COORD.
This operation primarily influences the proj_XXX_dist functions,
which mostly work by calling Charles Karney's geodesic
subsystem, keeping the distance, and throwing away the start and
end azimuths for the geodesic computed.
Also a PJ_GEOD(esic) persona is introduced for the PJ_COORD type.
The proj_geod function returns a PJ_GEOD, representing the geodesic
between the points represented by its PJ_COORD arguments.
Finally, the proj_factors functions had its lp argument changed
from PJ_LP to PJ_COORD.
Diffstat (limited to 'src/gie.c')
| -rw-r--r-- | src/gie.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -850,9 +850,9 @@ Tell GIE what to expect, when transforming the ACCEPTed input } #endif if (proj_angular_output (T.P, T.dir)) - d = proj_lpz_dist (T.P, ce.lpz, co.lpz); + d = proj_lpz_dist (T.P, ce, co); else - d = proj_xyz_dist (co.xyz, ce.xyz); + d = proj_xyz_dist (co, ce); if (d > T.tolerance) return expect_message (d, args); @@ -1432,13 +1432,13 @@ static int pj_horner_selftest (void) { /* Forward projection */ b = proj_trans (P, PJ_FWD, a); - dist = proj_xy_dist (b.xy, c.xy); + dist = proj_xy_dist (b, c); if (dist > 0.001) return 2; /* Inverse projection */ b = proj_trans (P, PJ_INV, c); - dist = proj_xy_dist (b.xy, a.xy); + dist = proj_xy_dist (b, a); if (dist > 0.001) return 3; @@ -1520,7 +1520,7 @@ static int pj_cart_selftest (void) { /* Forward again, to get two linear items for comparison */ a = proj_trans (P, PJ_FWD, a); - dist = proj_xy_dist (a.xy, b.xy); + dist = proj_xy_dist (a, b); if (dist > 2e-9) return 3; @@ -1771,7 +1771,7 @@ static int pj_cart_selftest (void) { a.lp.lam = PJ_TORAD(12); a.lp.phi = PJ_TORAD(55); - factors = proj_factors(P, a.lp); + factors = proj_factors(P, a); if (proj_errno(P)) return 85; /* factors not created correctly */ |
