From 9b3290c09850893eefaae2d7b8074d4740dcece5 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 25 Jul 2017 11:49:05 +0200 Subject: Expose pj_factors and pj_deriv in public API. (#546) Expose pj_factors and pj_deriv in public API. proj_derivatives() and proj_factors() has been introduced to the public proj.h API. The new functions are simply wrappers for the original functions. The h argument of the two functions has been omitted in the new wrappers as it does not seem to be used very much (if at all?). --- src/proj.h | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/proj.h') diff --git a/src/proj.h b/src/proj.h index 398368c4..5f165dc5 100644 --- a/src/proj.h +++ b/src/proj.h @@ -182,6 +182,12 @@ 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 PJ_FACTORS; +typedef struct PJ_FACTORS PJ_FACTORS; + /* Data type for projection/transformation information */ struct PJconsts; typedef struct PJconsts PJ; /* the PJ object herself */ @@ -269,12 +275,26 @@ 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 */ +}; + + /* The context type - properly namespaced synonym for projCtx */ struct projCtx_t; typedef struct projCtx_t PJ_CONTEXT; - - /* A P I */ @@ -356,6 +376,8 @@ int proj_has_inverse(PJ *P); double proj_dmstor(const char *is, char **rs); char* proj_rtodms(char *s, double r, int pos, int neg); +PJ_DERIVS proj_derivatives(const PJ *P, const LP lp); +PJ_FACTORS proj_factors(const PJ *P, const LP lp); #ifdef __cplusplus } -- cgit v1.2.3