svn-gvsig-desktop / tags / v1_1_2_Build_1045 / libraries / libjni-proj4 / src / PJ_wag3.c @ 38629
History | View | Annotate | Download (685 Bytes)
1 |
#ifndef lint
|
---|---|
2 |
static const char SCCSID[]="@(#)PJ_wag3.c 4.1 94/02/15 GIE REL"; |
3 |
#endif
|
4 |
#define PROJ_PARMS__ \
|
5 |
double C_x;
|
6 |
#define PJ_LIB__
|
7 |
# include <projects.h> |
8 |
PROJ_HEAD(wag3, "Wagner III") "\n\tPCyl., Sph."; |
9 |
#define TWOTHIRD 0.6666666666666666666667 |
10 |
FORWARD(s_forward); /* spheroid */
|
11 |
xy.x = P->C_x * lp.lam * cos(TWOTHIRD * lp.phi); |
12 |
xy.y = lp.phi; |
13 |
return (xy);
|
14 |
} |
15 |
INVERSE(s_inverse); /* spheroid */
|
16 |
lp.phi = xy.y; |
17 |
lp.lam = xy.x / (P->C_x * cos(TWOTHIRD * lp.phi)); |
18 |
return (lp);
|
19 |
} |
20 |
FREEUP; if (P) pj_dalloc(P); }
|
21 |
ENTRY0(wag3) |
22 |
double ts;
|
23 |
|
24 |
ts = pj_param(P->params, "rlat_ts").f;
|
25 |
P->C_x = cos(ts) / cos(2.*ts/3.); |
26 |
P->es = 0.; P->inv = s_inverse; P->fwd = s_forward;
|
27 |
ENDENTRY(P) |