Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libjni-proj4 / src / PJ_putp3.c @ 7098

History | View | Annotate | Download (798 Bytes)

1
#ifndef lint
2
static const char SCCSID[]="@(#)PJ_putp3.c        4.1        94/02/15        GIE        REL";
3
#endif
4
#define PROJ_PARMS__ \
5
        double        A;
6
#define PJ_LIB__
7
# include        <projects.h>
8
PROJ_HEAD(putp3, "Putnins P3") "\n\tPCyl., Sph.";
9
PROJ_HEAD(putp3p, "Putnins P3'") "\n\tPCyl., no inv., Sph.";
10
#define C        0.79788456
11
#define RPISQ        0.1013211836
12
FORWARD(s_forward); /* spheroid */
13
        xy.x = C * lp.lam * (1. - P->A * lp.phi * lp.phi);
14
        xy.y = C * lp.phi;
15
        return (xy);
16
}
17
INVERSE(s_inverse); /* spheroid */
18
        lp.phi = xy.y / C;
19
        lp.lam = xy.x / (C * (1. - P->A * 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.; P->inv = s_inverse; P->fwd = s_forward;
26
        return P;
27
}
28
ENTRY0(putp3)  P->A = 4. * RPISQ; ENDENTRY(setup(P))
29
ENTRY0(putp3p) P->A = 2. * RPISQ; ENDENTRY(setup(P))