diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2017-09-21 21:10:07 +0200 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2017-09-21 21:10:07 +0200 |
| commit | 33175ead05bf03853ab8a33372602160cf69d745 (patch) | |
| tree | 2e5d35ccb6577bbeee13e0155eece9bba5f11db8 /src | |
| parent | 9755994609973ee5325530052a241f85469da864 (diff) | |
| download | PROJ-33175ead05bf03853ab8a33372602160cf69d745.tar.gz PROJ-33175ead05bf03853ab8a33372602160cf69d745.zip | |
Use FACTORS and DERIVS structs from projects.h instead of duplicating them in proj.h
Diffstat (limited to 'src')
| -rw-r--r-- | src/pj_obs_api.c | 6 | ||||
| -rw-r--r-- | src/proj.h | 24 |
2 files changed, 6 insertions, 24 deletions
diff --git a/src/pj_obs_api.c b/src/pj_obs_api.c index df8cfa3d..54c75f45 100644 --- a/src/pj_obs_api.c +++ b/src/pj_obs_api.c @@ -740,8 +740,7 @@ PJ_DERIVS proj_derivatives(const PJ *P, const LP lp) { ******************************************************************************/ PJ_DERIVS derivs; - /* casting to struct DERIVS for compatibility reasons */ - if (pj_deriv(lp, 1e-5, (PJ *)P, (struct DERIVS *)&derivs)) { + if (pj_deriv(lp, 1e-5, (PJ *)P, &derivs)) { /* errno set in pj_derivs */ memset(&derivs, 0, sizeof(PJ_DERIVS)); } @@ -767,8 +766,7 @@ PJ_FACTORS proj_factors(const PJ *P, const LP lp) { /* pj_factors rely code being zero */ factors.code = 0; - /* casting to struct FACTORS for compatibility reasons */ - if (pj_factors(lp, (PJ *)P, 0.0, (struct FACTORS *)&factors)) { + if (pj_factors(lp, (PJ *)P, 0.0, &factors)) { /* errno set in pj_factors */ memset(&factors, 0, sizeof(PJ_FACTORS)); } @@ -182,11 +182,11 @@ typedef union PJ_TRIPLET PJ_TRIPLET; union PJ_COORD; typedef union PJ_COORD PJ_COORD; -struct PJ_DERIVS; -typedef struct PJ_DERIVS PJ_DERIVS; +struct DERIVS; +typedef struct DERIVS PJ_DERIVS; -struct PJ_FACTORS; -typedef struct PJ_FACTORS PJ_FACTORS; +struct FACTORS; +typedef struct FACTORS PJ_FACTORS; /* Data type for projection/transformation information */ struct PJconsts; @@ -288,22 +288,6 @@ struct PJ_OBS { unsigned int flags; /* additional data, intended for flags */ }; - -struct PJ_DERIVS { - double x_l, x_p; /* derivatives of x for lambda-phi */ - double y_l, y_p; /* derivatives of y for lambda-phi */ -}; - -struct PJ_FACTORS { - struct PJ_DERIVS der; - double h, k; /* meridional, parallel scales */ - double omega, thetap; /* angular distortion, theta prime */ - double conv; /* convergence */ - double s; /* areal scale factor */ - double a, b; /* max-min scale error */ - int code; /* info as to analytics, see following */ -}; - #define PJ_IS_ANAL_XL_YL 01 /* derivatives of lon analytic */ #define PJ_IS_ANAL_XP_YP 02 /* derivatives of lat analytic */ #define PJ_IS_ANAL_HK 04 /* h and k analytic */ |
