diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-12-26 14:22:34 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-12-30 21:48:56 +0100 |
| commit | 1b1d60e83a20412aeca3e440705df820979af03b (patch) | |
| tree | a96858922bc09392b5cea01750b05115f4f3afff /src/conversions | |
| parent | c9b32000d5fc12705bea92e6509fbedb37193012 (diff) | |
| download | PROJ-1b1d60e83a20412aeca3e440705df820979af03b.tar.gz PROJ-1b1d60e83a20412aeca3e440705df820979af03b.zip | |
projects.h: remove deprecated XY, XYZ, LP, LPZ, UV, UVW, projUV and projUVW structures
Diffstat (limited to 'src/conversions')
| -rw-r--r-- | src/conversions/axisswap.cpp | 9 | ||||
| -rw-r--r-- | src/conversions/cart.cpp | 12 | ||||
| -rw-r--r-- | src/conversions/geocent.cpp | 10 | ||||
| -rw-r--r-- | src/conversions/unitconvert.cpp | 8 |
4 files changed, 21 insertions, 18 deletions
diff --git a/src/conversions/axisswap.cpp b/src/conversions/axisswap.cpp index 8714ec85..f9dd4fa5 100644 --- a/src/conversions/axisswap.cpp +++ b/src/conversions/axisswap.cpp @@ -57,6 +57,7 @@ operation: #include <stdlib.h> #include <string.h> +#include "proj.h" #include "proj_internal.h" #include "projects.h" @@ -73,7 +74,7 @@ static int sign(int x) { return (x > 0) - (x < 0); } -static XY forward_2d(LP lp, PJ *P) { +static PJ_XY forward_2d(PJ_LP lp, PJ *P) { struct pj_opaque *Q = (struct pj_opaque *) P->opaque; unsigned int i; PJ_COORD out, in; @@ -88,7 +89,7 @@ static XY forward_2d(LP lp, PJ *P) { } -static LP reverse_2d(XY xy, PJ *P) { +static PJ_LP reverse_2d(PJ_XY xy, PJ *P) { struct pj_opaque *Q = (struct pj_opaque *) P->opaque; unsigned int i; PJ_COORD out, in; @@ -103,7 +104,7 @@ static LP reverse_2d(XY xy, PJ *P) { } -static XYZ forward_3d(LPZ lpz, PJ *P) { +static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) { struct pj_opaque *Q = (struct pj_opaque *) P->opaque; unsigned int i; PJ_COORD out, in; @@ -117,7 +118,7 @@ static XYZ forward_3d(LPZ lpz, PJ *P) { return out.xyz; } -static LPZ reverse_3d(XYZ xyz, PJ *P) { +static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) { struct pj_opaque *Q = (struct pj_opaque *) P->opaque; unsigned int i; PJ_COORD in, out; diff --git a/src/conversions/cart.cpp b/src/conversions/cart.cpp index 6fed9985..bcfbb5e6 100644 --- a/src/conversions/cart.cpp +++ b/src/conversions/cart.cpp @@ -131,10 +131,10 @@ static double geocentric_radius (double a, double b, double phi) { /*********************************************************************/ -static XYZ cartesian (LPZ geod, PJ *P) { +static PJ_XYZ cartesian (PJ_LPZ geod, PJ *P) { /*********************************************************************/ double N, cosphi = cos(geod.phi); - XYZ xyz; + PJ_XYZ xyz; N = normal_radius_of_curvature(P->a, P->es, geod.phi); @@ -148,10 +148,10 @@ static XYZ cartesian (LPZ geod, PJ *P) { /*********************************************************************/ -static LPZ geodetic (XYZ cart, PJ *P) { +static PJ_LPZ geodetic (PJ_XYZ cart, PJ *P) { /*********************************************************************/ double N, p, theta, c, s; - LPZ lpz; + PJ_LPZ lpz; /* Perpendicular distance from point to Z-axis (HM eq. 5-28) */ p = hypot (cart.x, cart.y); @@ -185,7 +185,7 @@ static LPZ geodetic (XYZ cart, PJ *P) { /* In effect, 2 cartesian coordinates of a point on the ellipsoid. Rather pointless, but... */ -static XY cart_forward (LP lp, PJ *P) { +static PJ_XY cart_forward (PJ_LP lp, PJ *P) { PJ_COORD point; point.lp = lp; point.lpz.z = 0; @@ -195,7 +195,7 @@ static XY cart_forward (LP lp, PJ *P) { } /* And the other way round. Still rather pointless, but... */ -static LP cart_reverse (XY xy, PJ *P) { +static PJ_LP cart_reverse (PJ_XY xy, PJ *P) { PJ_COORD point; point.xy = xy; point.xyz.z = 0; diff --git a/src/conversions/geocent.cpp b/src/conversions/geocent.cpp index 0e9d725e..d5f3e075 100644 --- a/src/conversions/geocent.cpp +++ b/src/conversions/geocent.cpp @@ -28,20 +28,22 @@ *****************************************************************************/ #define PJ_LIB__ + +#include "proj.h" #include "projects.h" PROJ_HEAD(geocent, "Geocentric") "\n\t"; -static XY forward(LP lp, PJ *P) { - XY xy = {0.0,0.0}; +static PJ_XY forward(PJ_LP lp, PJ *P) { + PJ_XY xy = {0.0,0.0}; (void) P; xy.x = lp.lam; xy.y = lp.phi; return xy; } -static LP inverse(XY xy, PJ *P) { - LP lp = {0.0,0.0}; +static PJ_LP inverse(PJ_XY xy, PJ *P) { + PJ_LP lp = {0.0,0.0}; (void) P; lp.phi = xy.y; lp.lam = xy.x; diff --git a/src/conversions/unitconvert.cpp b/src/conversions/unitconvert.cpp index b25fd5d2..10c56344 100644 --- a/src/conversions/unitconvert.cpp +++ b/src/conversions/unitconvert.cpp @@ -281,7 +281,7 @@ static const struct TIME_UNITS time_units[] = { /***********************************************************************/ -static XY forward_2d(LP lp, PJ *P) { +static PJ_XY forward_2d(PJ_LP lp, PJ *P) { /************************************************************************ Forward unit conversions in the plane ************************************************************************/ @@ -297,7 +297,7 @@ static XY forward_2d(LP lp, PJ *P) { /***********************************************************************/ -static LP reverse_2d(XY xy, PJ *P) { +static PJ_LP reverse_2d(PJ_XY xy, PJ *P) { /************************************************************************ Reverse unit conversions in the plane ************************************************************************/ @@ -313,7 +313,7 @@ static LP reverse_2d(XY xy, PJ *P) { /***********************************************************************/ -static XYZ forward_3d(LPZ lpz, PJ *P) { +static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) { /************************************************************************ Forward unit conversions the vertical component ************************************************************************/ @@ -330,7 +330,7 @@ static XYZ forward_3d(LPZ lpz, PJ *P) { } /***********************************************************************/ -static LPZ reverse_3d(XYZ xyz, PJ *P) { +static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) { /************************************************************************ Reverse unit conversions the vertical component ************************************************************************/ |
