svn-gvsig-desktop / trunk / libraries / libjni-proj4 / src / PJ_cc.c @ 7098
History | View | Annotate | Download (566 Bytes)
1 |
#ifndef lint
|
---|---|
2 |
static const char SCCSID[]="@(#)PJ_cc.c 4.1 94/02/15 GIE REL"; |
3 |
#endif
|
4 |
#define PROJ_PARMS__ \
|
5 |
double ap;
|
6 |
#define PJ_LIB__
|
7 |
#include <projects.h> |
8 |
PROJ_HEAD(cc, "Central Cylindrical") "\n\tCyl, Sph"; |
9 |
#define EPS10 1.e-10 |
10 |
FORWARD(s_forward); /* spheroid */
|
11 |
if (fabs(fabs(lp.phi) - HALFPI) <= EPS10) F_ERROR;
|
12 |
xy.x = lp.lam; |
13 |
xy.y = tan(lp.phi); |
14 |
return (xy);
|
15 |
} |
16 |
INVERSE(s_inverse); /* spheroid */
|
17 |
lp.phi = atan(xy.y); |
18 |
lp.lam = xy.x; |
19 |
return (lp);
|
20 |
} |
21 |
FREEUP; if (P) pj_dalloc(P); }
|
22 |
ENTRY0(cc) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
|