diff options
| -rw-r--r-- | src/4D_api.cpp | 4 | ||||
| -rw-r--r-- | src/conversions/axisswap.cpp | 4 | ||||
| -rw-r--r-- | src/conversions/cart.cpp | 2 | ||||
| -rw-r--r-- | src/conversions/geoc.cpp | 4 | ||||
| -rw-r--r-- | src/conversions/geocent.cpp | 2 | ||||
| -rw-r--r-- | src/fwd.cpp | 4 | ||||
| -rw-r--r-- | src/inv.cpp | 4 | ||||
| -rw-r--r-- | src/proj_internal.h | 17 | ||||
| -rw-r--r-- | src/projections/latlong.cpp | 4 | ||||
| -rw-r--r-- | src/projections/ob_tran.cpp | 2 | ||||
| -rw-r--r-- | src/transformations/affine.cpp | 4 | ||||
| -rw-r--r-- | src/transformations/hgridshift.cpp | 4 | ||||
| -rw-r--r-- | src/transformations/molodensky.cpp | 4 | ||||
| -rw-r--r-- | src/transformations/vgridshift.cpp | 4 |
14 files changed, 26 insertions, 37 deletions
diff --git a/src/4D_api.cpp b/src/4D_api.cpp index d4ca51fa..e0d15773 100644 --- a/src/4D_api.cpp +++ b/src/4D_api.cpp @@ -68,8 +68,8 @@ int proj_angular_input (PJ *P, enum PJ_DIRECTION dir) { dir: {PJ_FWD, PJ_INV} ******************************************************************************/ if (PJ_FWD==dir) - return pj_left (P)==PJ_IO_UNITS_ANGULAR; - return pj_right (P)==PJ_IO_UNITS_ANGULAR; + return pj_left (P)==PJ_IO_UNITS_RADIANS; + return pj_right (P)==PJ_IO_UNITS_RADIANS; } /*****************************************************************************/ diff --git a/src/conversions/axisswap.cpp b/src/conversions/axisswap.cpp index 18d13f8c..97c8899a 100644 --- a/src/conversions/axisswap.cpp +++ b/src/conversions/axisswap.cpp @@ -282,8 +282,8 @@ PJ *CONVERSION(axisswap,0) { } if (pj_param(P->ctx, P->params, "tangularunits").i) { - P->left = PJ_IO_UNITS_ANGULAR; - P->right = PJ_IO_UNITS_ANGULAR; + P->left = PJ_IO_UNITS_RADIANS; + P->right = PJ_IO_UNITS_RADIANS; } else { P->left = PJ_IO_UNITS_WHATEVER; P->right = PJ_IO_UNITS_WHATEVER; diff --git a/src/conversions/cart.cpp b/src/conversions/cart.cpp index f8ec256b..d9aea9b8 100644 --- a/src/conversions/cart.cpp +++ b/src/conversions/cart.cpp @@ -213,7 +213,7 @@ PJ *CONVERSION(cart,1) { P->inv3d = geodetic; P->fwd = cart_forward; P->inv = cart_reverse; - P->left = PJ_IO_UNITS_ANGULAR; + P->left = PJ_IO_UNITS_RADIANS; P->right = PJ_IO_UNITS_CARTESIAN; return P; } diff --git a/src/conversions/geoc.cpp b/src/conversions/geoc.cpp index 66ca6199..e0ca3df3 100644 --- a/src/conversions/geoc.cpp +++ b/src/conversions/geoc.cpp @@ -51,8 +51,8 @@ static PJ *CONVERSION(geoc, 1) { P->inv4d = inverse; P->fwd4d = forward; - P->left = PJ_IO_UNITS_ANGULAR; - P->right = PJ_IO_UNITS_ANGULAR; + P->left = PJ_IO_UNITS_RADIANS; + P->right = PJ_IO_UNITS_RADIANS; P->is_latlong = 1; return P; diff --git a/src/conversions/geocent.cpp b/src/conversions/geocent.cpp index c8d2d486..31f1a30b 100644 --- a/src/conversions/geocent.cpp +++ b/src/conversions/geocent.cpp @@ -56,7 +56,7 @@ PJ *CONVERSION (geocent, 0) { P->y0 = 0.0; P->inv = inverse; P->fwd = forward; - P->left = PJ_IO_UNITS_ANGULAR; + P->left = PJ_IO_UNITS_RADIANS; P->right = PJ_IO_UNITS_CARTESIAN; return P; diff --git a/src/fwd.cpp b/src/fwd.cpp index 02f31f87..a8c51934 100644 --- a/src/fwd.cpp +++ b/src/fwd.cpp @@ -48,7 +48,7 @@ static PJ_COORD fwd_prepare (PJ *P, PJ_COORD coo) { if (HUGE_VAL==coo.v[3] && P->helmert) coo.v[3] = 0.0; /* Check validity of angular input coordinates */ - if (INPUT_UNITS==PJ_IO_UNITS_ANGULAR) { + if (INPUT_UNITS==PJ_IO_UNITS_RADIANS) { double t; /* check for latitude or longitude over-range */ @@ -135,7 +135,7 @@ static PJ_COORD fwd_finalize (PJ *P, PJ_COORD coo) { case PJ_IO_UNITS_WHATEVER: break; - case PJ_IO_UNITS_ANGULAR: + case PJ_IO_UNITS_RADIANS: coo.lpz.z = P->vfr_meter * (coo.lpz.z + P->z0); if( P->is_long_wrap_set ) { diff --git a/src/inv.cpp b/src/inv.cpp index 83c5498c..a05f8376 100644 --- a/src/inv.cpp +++ b/src/inv.cpp @@ -82,7 +82,7 @@ static PJ_COORD inv_prepare (PJ *P, PJ_COORD coo) { coo.xyz.y *= P->ra; return coo; - case PJ_IO_UNITS_ANGULAR: + case PJ_IO_UNITS_RADIANS: coo.lpz.z = P->vto_meter * coo.lpz.z - P->z0; break; } @@ -99,7 +99,7 @@ static PJ_COORD inv_finalize (PJ *P, PJ_COORD coo) { return proj_coord_error (); } - if (OUTPUT_UNITS==PJ_IO_UNITS_ANGULAR) { + if (OUTPUT_UNITS==PJ_IO_UNITS_RADIANS) { /* Distance from central meridian, taking system zero meridian into account */ coo.lp.lam = coo.lp.lam + P->from_greenwich + P->lam0; diff --git a/src/proj_internal.h b/src/proj_internal.h index 7573e1bf..f56e689e 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -172,15 +172,12 @@ typedef long pj_int32; #define DIR_CHAR '/' #endif - -/* This enum is also conditionally defined in projects.h - but enums cannot */ -/* be forward declared and we need it here for the pj_left/right prototypes */ enum pj_io_units { PJ_IO_UNITS_WHATEVER = 0, /* Doesn't matter (or depends on pipeline neighbours) */ PJ_IO_UNITS_CLASSIC = 1, /* Scaled meters (right), projected system */ PJ_IO_UNITS_PROJECTED = 2, /* Meters, projected system */ PJ_IO_UNITS_CARTESIAN = 3, /* Meters, 3D cartesian system */ - PJ_IO_UNITS_ANGULAR = 4 /* Radians */ + PJ_IO_UNITS_RADIANS = 4 /* Radians */ }; enum pj_io_units pj_left (PJ *P); enum pj_io_units pj_right (PJ *P); @@ -245,15 +242,7 @@ struct ARG_list; struct PJ_REGION_S; typedef struct PJ_REGION_S PJ_Region; typedef struct ARG_list paralist; /* parameter list */ -#ifndef PROJ_INTERNAL_H -enum pj_io_units { - PJ_IO_UNITS_WHATEVER = 0, /* Doesn't matter (or depends on pipeline neighbours) */ - PJ_IO_UNITS_CLASSIC = 1, /* Scaled meters (right), projected system */ - PJ_IO_UNITS_PROJECTED = 2, /* Meters, projected system */ - PJ_IO_UNITS_CARTESIAN = 3, /* Meters, 3D cartesian system */ - PJ_IO_UNITS_ANGULAR = 4 /* Radians */ -}; -#endif + #ifndef PROJ_H typedef struct PJconsts PJ; /* the PJ object herself */ typedef union PJ_COORD PJ_COORD; @@ -690,7 +679,7 @@ C_NAMESPACE PJ *pj_##name (PJ *P) { \ return nullptr; \ P->descr = des_##name; \ P->need_ellps = NEED_ELPJ_LPS; \ - P->left = PJ_IO_UNITS_ANGULAR; \ + P->left = PJ_IO_UNITS_RADIANS; \ P->right = PJ_IO_UNITS_CLASSIC; \ return P; \ } \ diff --git a/src/projections/latlong.cpp b/src/projections/latlong.cpp index f114504b..970c4893 100644 --- a/src/projections/latlong.cpp +++ b/src/projections/latlong.cpp @@ -98,8 +98,8 @@ static PJ *latlong_setup (PJ *P) { P->fwd3d = latlong_forward_3d; P->inv4d = latlong_inverse_4d; P->fwd4d = latlong_forward_4d; - P->left = PJ_IO_UNITS_ANGULAR; - P->right = PJ_IO_UNITS_ANGULAR; + P->left = PJ_IO_UNITS_RADIANS; + P->right = PJ_IO_UNITS_RADIANS; return P; } diff --git a/src/projections/ob_tran.cpp b/src/projections/ob_tran.cpp index 1726b622..6daae394 100644 --- a/src/projections/ob_tran.cpp +++ b/src/projections/ob_tran.cpp @@ -237,7 +237,7 @@ PJ *PROJECTION(ob_tran) { /* Support some rather speculative test cases, where the rotated projection */ /* is actually latlong. We do not want scaling in that case... */ - if (Q->link->right==PJ_IO_UNITS_ANGULAR) + if (Q->link->right==PJ_IO_UNITS_RADIANS) P->right = PJ_IO_UNITS_PROJECTED; diff --git a/src/transformations/affine.cpp b/src/transformations/affine.cpp index 21529a20..bda54f1e 100644 --- a/src/transformations/affine.cpp +++ b/src/transformations/affine.cpp @@ -238,8 +238,8 @@ PJ *TRANSFORMATION(geogoffset,0 /* no need for ellipsoid */) { P->fwd = forward_2d; P->inv = reverse_2d; - P->left = PJ_IO_UNITS_ANGULAR; - P->right = PJ_IO_UNITS_ANGULAR; + P->left = PJ_IO_UNITS_RADIANS; + P->right = PJ_IO_UNITS_RADIANS; /* read args */ Q->xoff = pj_param(P->ctx, P->params, "ddlon").f * ARCSEC_TO_RAD; diff --git a/src/transformations/hgridshift.cpp b/src/transformations/hgridshift.cpp index 788c2ebb..2e2294cb 100644 --- a/src/transformations/hgridshift.cpp +++ b/src/transformations/hgridshift.cpp @@ -93,8 +93,8 @@ PJ *TRANSFORMATION(hgridshift,0) { P->fwd = nullptr; P->inv = nullptr; - P->left = PJ_IO_UNITS_ANGULAR; - P->right = PJ_IO_UNITS_ANGULAR; + P->left = PJ_IO_UNITS_RADIANS; + P->right = PJ_IO_UNITS_RADIANS; if (0==pj_param(P->ctx, P->params, "tgrids").i) { proj_log_error(P, "hgridshift: +grids parameter missing."); diff --git a/src/transformations/molodensky.cpp b/src/transformations/molodensky.cpp index 002c5286..c389fd32 100644 --- a/src/transformations/molodensky.cpp +++ b/src/transformations/molodensky.cpp @@ -287,8 +287,8 @@ PJ *TRANSFORMATION(molodensky,1) { P->fwd = forward_2d; P->inv = reverse_2d; - P->left = PJ_IO_UNITS_ANGULAR; - P->right = PJ_IO_UNITS_ANGULAR; + P->left = PJ_IO_UNITS_RADIANS; + P->right = PJ_IO_UNITS_RADIANS; /* read args */ if (pj_param(P->ctx, P->params, "tdx").i) { diff --git a/src/transformations/vgridshift.cpp b/src/transformations/vgridshift.cpp index 95537cda..fda38ec3 100644 --- a/src/transformations/vgridshift.cpp +++ b/src/transformations/vgridshift.cpp @@ -137,8 +137,8 @@ PJ *TRANSFORMATION(vgridshift,0) { P->fwd = nullptr; P->inv = nullptr; - P->left = PJ_IO_UNITS_ANGULAR; - P->right = PJ_IO_UNITS_ANGULAR; + P->left = PJ_IO_UNITS_RADIANS; + P->right = PJ_IO_UNITS_RADIANS; return P; } |
