svn-gvsig-desktop / tags / v1_9_Build_1246 / libraries / libjni-proj4 / src / PJ_eck3.c
History | View | Annotate | Download (1.28 KB)
1 |
#ifndef lint
|
---|---|
2 |
static const char SCCSID[]="@(#)PJ_eck3.c 4.1 94/02/15 GIE REL"; |
3 |
#endif
|
4 |
#define PROJ_PARMS__ \
|
5 |
double C_x, C_y, A, B;
|
6 |
#define PJ_LIB__
|
7 |
#include <projects.h> |
8 |
PROJ_HEAD(eck3, "Eckert III") "\n\tPCyl, Sph."; |
9 |
PROJ_HEAD(putp1, "Putnins P1") "\n\tPCyl, Sph."; |
10 |
PROJ_HEAD(wag6, "Wagner VI") "\n\tPCyl, Sph."; |
11 |
PROJ_HEAD(kav7, "Kavraisky VII") "\n\tPCyl, Sph."; |
12 |
FORWARD(s_forward); /* spheroid */
|
13 |
xy.y = P->C_y * lp.phi; |
14 |
xy.x = P->C_x * lp.lam * (P->A + asqrt(1. - P->B * lp.phi * lp.phi));
|
15 |
return (xy);
|
16 |
} |
17 |
INVERSE(s_inverse); /* spheroid */
|
18 |
lp.phi = xy.y / P->C_y; |
19 |
lp.lam = xy.x / (P->C_x * (P->A + asqrt(1. - P->B * lp.phi * lp.phi)));
|
20 |
return (lp);
|
21 |
} |
22 |
FREEUP; if (P) pj_dalloc(P); }
|
23 |
static PJ *
|
24 |
setup(PJ *P) { |
25 |
P->es = 0.;
|
26 |
P->inv = s_inverse; |
27 |
P->fwd = s_forward; |
28 |
return P;
|
29 |
} |
30 |
ENTRY0(eck3) |
31 |
P->C_x = .42223820031577120149;
|
32 |
P->C_y = .84447640063154240298;
|
33 |
P->A = 1.;
|
34 |
P->B = 0.4052847345693510857755; |
35 |
ENDENTRY(setup(P)) |
36 |
ENTRY0(kav7) |
37 |
P->C_x = 0.2632401569273184856851; |
38 |
P->C_x = 0.8660254037844; |
39 |
P->C_y = 1.;
|
40 |
P->A = 0.;
|
41 |
P->B = 0.30396355092701331433; |
42 |
ENDENTRY(setup(P)) |
43 |
ENTRY0(wag6); |
44 |
P->C_x = P->C_y = 0.94745; |
45 |
P->A = 0.;
|
46 |
P->B = 0.30396355092701331433; |
47 |
ENDENTRY(setup(P)) |
48 |
ENTRY0(putp1); |
49 |
P->C_x = 1.89490; |
50 |
P->C_y = 0.94745; |
51 |
P->A = -0.5; |
52 |
P->B = 0.30396355092701331433; |
53 |
ENDENTRY(setup(P)) |