1
/* general forward projection */
3
static const char SCCSID[]="@(#)pj_fwd.c 4.4 93/06/12 GIE REL";
9
XY /* forward projection entry */
10
pj_fwd(LP lp, PJ *P) {
14
/* check for forward and latitude or longitude overange */
15
if ((t = fabs(lp.phi)-HALFPI) > EPS || fabs(lp.lam) > 10.) {
16
xy.x = xy.y = HUGE_VAL;
18
} else { /* proceed with projection */
21
lp.phi = lp.phi < 0. ? -HALFPI : HALFPI;
23
lp.phi = atan(P->rone_es * tan(lp.phi));
24
lp.lam -= P->lam0; /* compute del lp.lam */
26
lp.lam = adjlon(lp.lam); /* adjust del longitude */
27
xy = (*P->fwd)(lp, P); /* project */
28
if (pj_errno || (pj_errno = errno))
29
xy.x = xy.y = HUGE_VAL;
30
/* adjust for major axis and easting/northings */
32
xy.x = P->fr_meter * (P->a * xy.x + P->x0);
33
xy.y = P->fr_meter * (P->a * xy.y + P->y0);