From 2cca9ead11be47f6efd0ab504cf2e9020b85fa80 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 10 Feb 2018 23:02:47 +0100 Subject: 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. --- src/gie.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gie.c') diff --git a/src/gie.c b/src/gie.c index 95f50708..5acec578 100644 --- a/src/gie.c +++ b/src/gie.c @@ -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 */ -- cgit v1.2.3