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

Function pj_inv3d

ThirdParty/libproj/vtklibproj/src/inv.cpp:180–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178
179
180PJ_LPZ pj_inv3d (PJ_XYZ xyz, PJ *P) {
181 int last_errno;
182 PJ_COORD coo = {{0,0,0,0}};
183 coo.xyz = xyz;
184
185 last_errno = proj_errno_reset(P);
186
187 if (!P->skip_inv_prepare)
188 coo = inv_prepare (P, coo);
189 if (HUGE_VAL==coo.v[0])
190 return proj_coord_error ().lpz;
191
192 /* Do the transformation, using the lowest dimensional transformer feasible */
193 if (P->inv3d)
194 coo.lpz = P->inv3d (coo.xyz, P);
195 else if (P->inv4d)
196 coo = P->inv4d (coo, P);
197 else if (P->inv)
198 coo.lp = P->inv (coo.xy, P);
199 else {
200 proj_errno_set (P, PROJ_ERR_OTHER_NO_INVERSE_OP);
201 return proj_coord_error ().lpz;
202 }
203 if (HUGE_VAL==coo.v[0])
204 return proj_coord_error ().lpz;
205
206 if (!P->skip_inv_finalize)
207 coo = inv_finalize (P, coo);
208
209 return error_or_coord(P, coo, last_errno).lpz;
210}
211
212
213

Callers 5

pj_approx_3D_transFunction · 0.85
topocentric.cppFile · 0.85
iterative_adjustmentFunction · 0.85
direct_adjustmentFunction · 0.85
get_grid_shiftFunction · 0.85

Calls 6

proj_errno_resetFunction · 0.85
inv_prepareFunction · 0.85
proj_coord_errorFunction · 0.85
proj_errno_setFunction · 0.85
inv_finalizeFunction · 0.85
error_or_coordFunction · 0.70

Tested by

no test coverage detected