Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 30 lines (29 sloc) 0.868 kB
1a37e1c @josephg Readded source
josephg authored
1 #define PROJ_PARMS__ \
2 double C_x, C_y;
3 #define PJ_LIB__
ef491e8 o Updated Proj4 to 4.7.0 (with some fixes to silence compiler warnings)
Thomas Rasch authored
4 # include <projects.h>
1a37e1c @josephg Readded source
josephg authored
5 PROJ_HEAD(putp4p, "Putnins P4'") "\n\tPCyl., Sph.";
6 PROJ_HEAD(weren, "Werenskiold I") "\n\tPCyl., Sph.";
7 FORWARD(s_forward); /* spheroid */
8 lp.phi = aasin(0.883883476 * sin(lp.phi));
9 xy.x = P->C_x * lp.lam * cos(lp.phi);
10 xy.x /= cos(lp.phi *= 0.333333333333333);
11 xy.y = P->C_y * sin(lp.phi);
12 return (xy);
13 }
14 INVERSE(s_inverse); /* spheroid */
15 lp.phi = aasin(xy.y / P->C_y);
16 lp.lam = xy.x * cos(lp.phi) / P->C_x;
17 lp.phi *= 3.;
18 lp.lam /= cos(lp.phi);
19 lp.phi = aasin(1.13137085 * sin(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(putp4p) P->C_x = 0.874038744; P->C_y = 3.883251825; ENDENTRY(setup(P))
29 ENTRY0(weren) P->C_x = 1.; P->C_y = 4.442882938; ENDENTRY(setup(P))
Something went wrong with that request. Please try again.