Coverage Report

Created: 2025-06-13 06:18

/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
0
static PJ_XY mill_s_forward(PJ_LP lp, PJ *P) { /* Spheroidal, forward */
11
0
    PJ_XY xy = {0.0, 0.0};
12
0
    (void)P;
13
14
0
    xy.x = lp.lam;
15
0
    xy.y = log(tan(M_FORTPI + lp.phi * .4)) * 1.25;
16
17
0
    return (xy);
18
0
}
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
0
PJ *PJ_PROJECTION(mill) {
31
0
    P->es = 0.;
32
0
    P->inv = mill_s_inverse;
33
0
    P->fwd = mill_s_forward;
34
35
0
    return P;
36
0
}