Coverage Report

Created: 2025-08-03 06:36

/src/PROJ/src/projections/mill.cpp
Line
Count
Source (jump to first uncovered line)
1
2
3
#include <math.h>
4
5
#include "proj.h"
6
#include "proj_internal.h"
7
8
PROJ_HEAD(mill, "Miller Cylindrical") "\n\tCyl, Sph";
9
10
2.52k
static PJ_XY mill_s_forward(PJ_LP lp, PJ *P) { /* Spheroidal, forward */
11
2.52k
    PJ_XY xy = {0.0, 0.0};
12
2.52k
    (void)P;
13
14
2.52k
    xy.x = lp.lam;
15
2.52k
    xy.y = log(tan(M_FORTPI + lp.phi * .4)) * 1.25;
16
17
2.52k
    return (xy);
18
2.52k
}
19
20
0
static PJ_LP mill_s_inverse(PJ_XY xy, PJ *P) { /* Spheroidal, inverse */
21
0
    PJ_LP lp = {0.0, 0.0};
22
0
    (void)P;
23
24
0
    lp.lam = xy.x;
25
0
    lp.phi = 2.5 * (atan(exp(.8 * xy.y)) - M_FORTPI);
26
27
0
    return (lp);
28
0
}
29
30
80
PJ *PJ_PROJECTION(mill) {
31
80
    P->es = 0.;
32
80
    P->inv = mill_s_inverse;
33
80
    P->fwd = mill_s_forward;
34
35
80
    return P;
36
80
}