MCPcopy Create free account
hub / github.com/Kitware/VTK / PROJECTION

Function PROJECTION

ThirdParty/libproj/vtklibproj/src/projections/ccon.cpp:83–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83PJ *PROJECTION(ccon) {
84
85 struct pj_opaque *Q = static_cast<struct pj_opaque*>(calloc (1, sizeof (struct pj_opaque)));
86 if (nullptr==Q)
87 return pj_default_destructor (P, PROJ_ERR_OTHER /*ENOMEM*/);
88 P->opaque = Q;
89 P->destructor = destructor;
90
91 Q->phi1 = pj_param(P->ctx, P->params, "rlat_1").f;
92 if (fabs(Q->phi1) < EPS10)
93 {
94 proj_log_error(P, _("Invalid value for lat_1: |lat_1| should be > 0"));
95 return destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE);
96 }
97 if (!(Q->en = pj_enfn(P->es)))
98 return destructor(P, PROJ_ERR_OTHER /*ENOMEM*/);
99
100 Q->sinphi1 = sin(Q->phi1);
101 Q->cosphi1 = cos(Q->phi1);
102 Q->ctgphi1 = Q->cosphi1/Q->sinphi1;
103
104
105 P->inv = ccon_inverse;
106 P->fwd = ccon_forward;
107
108 return P;
109}
110
111

Callers

nothing calls this directly

Calls 7

pj_default_destructorFunction · 0.85
pj_paramFunction · 0.85
proj_log_errorFunction · 0.85
pj_enfnFunction · 0.85
destructorFunction · 0.70
sinFunction · 0.50
cosFunction · 0.50

Tested by

no test coverage detected