Menu

[r6004]: / trunk / toolkits / basemap / src / PJ_putp4p.c  Maximize  Restore  History

Download this file

33 lines (32 with data), 955 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef lint
static const char SCCSID[]="@(#)PJ_putp4p.c 4.1 94/02/15 GIE REL";
#endif
#define PROJ_PARMS__ \
double C_x, C_y;
#define PJ_LIB__
# include <projects.h>
PROJ_HEAD(putp4p, "Putnins P4'") "\n\tPCyl., Sph.";
PROJ_HEAD(weren, "Werenskiold I") "\n\tPCyl., Sph.";
FORWARD(s_forward); /* spheroid */
lp.phi = aasin(0.883883476 * sin(lp.phi));
xy.x = P->C_x * lp.lam * cos(lp.phi);
xy.x /= cos(lp.phi *= 0.333333333333333);
xy.y = P->C_y * sin(lp.phi);
return (xy);
}
INVERSE(s_inverse); /* spheroid */
lp.phi = aasin(xy.y / P->C_y);
lp.lam = xy.x * cos(lp.phi) / P->C_x;
lp.phi *= 3.;
lp.lam /= cos(lp.phi);
lp.phi = aasin(1.13137085 * sin(lp.phi));
return (lp);
}
FREEUP; if (P) pj_dalloc(P); }
static PJ *
setup(PJ *P) {
P->es = 0.; P->inv = s_inverse; P->fwd = s_forward;
return P;
}
ENTRY0(putp4p) P->C_x = 0.874038744; P->C_y = 3.883251825; ENDENTRY(setup(P))
ENTRY0(weren) P->C_x = 1.; P->C_y = 4.442882938; ENDENTRY(setup(P))
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.