22 #if !defined(GEODESIC_H)
29 #define GEODESIC_VERSION_MAJOR 2
34 #define GEODESIC_VERSION_MINOR 1
39 #define GEODESIC_VERSION_PATCH 0
46 #define GEODESIC_VERSION_NUM(a,b,c) ((((a) * 10000 + (b)) * 100) + (c))
59 #define GEODESIC_VERSION \
60 GEODESIC_VERSION_NUM(GEODESIC_VERSION_MAJOR, \
61 GEODESIC_VERSION_MINOR, \
62 GEODESIC_VERSION_PATCH)
64 #if !defined(GEOD_DLL)
65 #if defined(_MSC_VER) && defined(PROJ_MSVC_DLL_EXPORT)
66 #define GEOD_DLL __declspec(dllexport)
67 #elif defined(__GNUC__)
68 #define GEOD_DLL __attribute__ ((visibility("default")))
74 #if defined(PROJ_RENAME_SYMBOLS)
75 #include "proj_symbol_rename.h"
78 #if defined(__cplusplus)
90 double f1, e2, ep2, n, b, c2, etol2;
91 double A3x[6], C3x[15], C4x[21];
111 double b, c2, f1, salp0, calp0, k2,
112 ssig1, csig1, dn1, stau1, ctau1, somg1, comg1,
113 A1m1, A2m1, A3c, B11, B21, B31, A4, B41;
114 double C1a[6+1], C1pa[6+1], C2a[6+1], C3a[6], C4a[6];
184 double lat1,
double lon1,
double azi1,
double s12,
185 double* plat2,
double* plon2,
double* pazi2);
226 double lat1,
double lon1,
double azi1,
227 unsigned flags,
double s12_a12,
228 double* plat2,
double* plon2,
double* pazi2,
229 double* ps12,
double* pm12,
230 double* pM12,
double* pM21,
272 double lat1,
double lon1,
273 double lat2,
double lon2,
274 double* ps12,
double* pazi1,
double* pazi2);
304 double lat1,
double lon1,
305 double lat2,
double lon2,
306 double* ps12,
double* pazi1,
double* pazi2,
307 double* pm12,
double* pM12,
double* pM21,
351 double lat1,
double lon1,
double azi1,
377 double lat1,
double lon1,
378 double azi1,
double s12,
408 double lat1,
double lon1,
double azi1,
409 unsigned flags,
double s12_a12,
434 double lat1,
double lon1,
435 double lat2,
double lon2,
484 double* plat2,
double* plon2,
double* pazi2);
551 unsigned flags,
double s12_a12,
552 double* plat2,
double* plon2,
double* pazi2,
553 double* ps12,
double* pm12,
554 double* pM12,
double* pM21,
585 unsigned flags,
double s13_a13);
635 double lat,
double lon);
655 double azi,
double s);
704 int reverse,
int sign,
705 double* pA,
double* pP);
735 double lat,
double lon,
736 int reverse,
int sign,
737 double* pA,
double* pP);
766 double azi,
double s,
767 int reverse,
int sign,
768 double* pA,
double* pP);
804 double lats[],
double lons[],
int n,
805 double* pA,
double* pP);
833 #if defined(__cplusplus)
double GEOD_DLL geod_gendirect(const struct geod_geodesic *g, double lat1, double lon1, double azi1, unsigned flags, double s12_a12, double *plat2, double *plon2, double *pazi2, double *ps12, double *pm12, double *pM12, double *pM21, double *pS12)
void GEOD_DLL geod_polygon_addedge(const struct geod_geodesic *g, struct geod_polygon *p, double azi, double s)
void GEOD_DLL geod_polygon_addpoint(const struct geod_geodesic *g, struct geod_polygon *p, double lat, double lon)
void GEOD_DLL geod_setdistance(struct geod_geodesicline *l, double s13)
void GEOD_DLL geod_gensetdistance(struct geod_geodesicline *l, unsigned flags, double s13_a13)
unsigned GEOD_DLL geod_polygon_testpoint(const struct geod_geodesic *g, const struct geod_polygon *p, double lat, double lon, int reverse, int sign, double *pA, double *pP)
void GEOD_DLL geod_polygon_clear(struct geod_polygon *p)
void GEOD_DLL geod_init(struct geod_geodesic *g, double a, double f)
void GEOD_DLL geod_directline(struct geod_geodesicline *l, const struct geod_geodesic *g, double lat1, double lon1, double azi1, double s12, unsigned caps)
void GEOD_DLL geod_inverse(const struct geod_geodesic *g, double lat1, double lon1, double lat2, double lon2, double *ps12, double *pazi1, double *pazi2)
unsigned GEOD_DLL geod_polygon_testedge(const struct geod_geodesic *g, const struct geod_polygon *p, double azi, double s, int reverse, int sign, double *pA, double *pP)
void GEOD_DLL geod_lineinit(struct geod_geodesicline *l, const struct geod_geodesic *g, double lat1, double lon1, double azi1, unsigned caps)
unsigned GEOD_DLL geod_polygon_compute(const struct geod_geodesic *g, const struct geod_polygon *p, int reverse, int sign, double *pA, double *pP)
void GEOD_DLL geod_position(const struct geod_geodesicline *l, double s12, double *plat2, double *plon2, double *pazi2)
double GEOD_DLL geod_geninverse(const struct geod_geodesic *g, double lat1, double lon1, double lat2, double lon2, double *ps12, double *pazi1, double *pazi2, double *pm12, double *pM12, double *pM21, double *pS12)
double GEOD_DLL geod_genposition(const struct geod_geodesicline *l, unsigned flags, double s12_a12, double *plat2, double *plon2, double *pazi2, double *ps12, double *pm12, double *pM12, double *pM21, double *pS12)
void GEOD_DLL geod_direct(const struct geod_geodesic *g, double lat1, double lon1, double azi1, double s12, double *plat2, double *plon2, double *pazi2)
void GEOD_DLL geod_polygonarea(const struct geod_geodesic *g, double lats[], double lons[], int n, double *pA, double *pP)
void GEOD_DLL geod_inverseline(struct geod_geodesicline *l, const struct geod_geodesic *g, double lat1, double lon1, double lat2, double lon2, unsigned caps)
void GEOD_DLL geod_gendirectline(struct geod_geodesicline *l, const struct geod_geodesic *g, double lat1, double lon1, double azi1, unsigned flags, double s12_a12, unsigned caps)
void GEOD_DLL geod_polygon_init(struct geod_polygon *p, int polylinep)