C library for Geodesics: planimeter.c Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6 #include <stdio.h>

8

9 #if defined(_MSC_VER)

10

11 # pragma warning (disable: 4996)

12 #endif

13

14

15

16

17

18

19

20

21

22

24 double a = 6378137, f = 1/298.257223563;

25 double lat, lon, A, P;

26 int n;

31

32 while (scanf("%lf %lf", &lat, &lon) == 2)

35 printf("%d %.8f %.3f\n", n, P, A);

36 return 0;

37 }

API for the geodesic routines in C.

void GEOD_DLL geod_polygon_addpoint(const struct geod_geodesic *g, struct geod_polygon *p, double lat, double lon)

void GEOD_DLL geod_init(struct geod_geodesic *g, double a, double f)

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_polygon_init(struct geod_polygon *p, int polylinep)