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

Function PROJECTION

ThirdParty/libproj/vtklibproj/src/projections/cass.cpp:118–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116
117
118PJ *PROJECTION(cass) {
119
120 /* Spheroidal? */
121 if (0==P->es) {
122 P->inv = cass_s_inverse;
123 P->fwd = cass_s_forward;
124 return P;
125 }
126
127 /* otherwise it's ellipsoidal */
128 auto Q = static_cast<struct cass_data*>(calloc (1, sizeof (struct cass_data)));
129 P->opaque = Q;
130 if (nullptr==P->opaque)
131 return pj_default_destructor (P, PROJ_ERR_OTHER /*ENOMEM*/);
132 P->destructor = destructor;
133
134 Q->en = pj_enfn (P->es);
135 if (nullptr==Q->en)
136 return pj_default_destructor (P, PROJ_ERR_OTHER /*ENOMEM*/);
137
138 Q->m0 = pj_mlfn (P->phi0, sin (P->phi0), cos (P->phi0), Q->en);
139 if (pj_param_exists(P->params, "hyperbolic"))
140 Q->hyperbolic = true;
141 P->inv = cass_e_inverse;
142 P->fwd = cass_e_forward;
143
144 return P;
145}

Callers

nothing calls this directly

Calls 6

pj_default_destructorFunction · 0.85
pj_enfnFunction · 0.85
pj_mlfnFunction · 0.85
pj_param_existsFunction · 0.85
sinFunction · 0.50
cosFunction · 0.50

Tested by

no test coverage detected