Statistics
| Revision:

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

History | View | Annotate | Download (609 Bytes)

1
#ifndef lint
2
static const char SCCSID[]="@(#)PJ_eqc.c        4.1        94/02/15        GIE        REL";
3
#endif
4
#define PROJ_PARMS__ \
5
        double rc;
6
#define PJ_LIB__
7
# include        <projects.h>
8
PROJ_HEAD(eqc, "Equidistant Cylindrical (Plate Caree)")
9
        "\n\tCyl, Sph\n\tlat_ts=";
10
FORWARD(s_forward); /* spheroid */
11
        xy.x = P->rc * lp.lam;
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->rc;
18
        return (lp);
19
}
20
FREEUP; if (P) pj_dalloc(P); }
21
ENTRY0(eqc)
22
        if ((P->rc = cos(pj_param(P->params, "rlat_ts").f)) <= 0.) E_ERROR(-24);
23
        P->inv = s_inverse;
24
        P->fwd = s_forward;
25
        P->es = 0.;
26
ENDENTRY(P)