| 253 | } |
| 254 | |
| 255 | static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) { |
| 256 | struct deformationData *Q = (struct deformationData *) P->opaque; |
| 257 | PJ_COORD out, in; |
| 258 | PJ_XYZ shift; |
| 259 | in.lpz = lpz; |
| 260 | out = in; |
| 261 | |
| 262 | if (Q->dt == HUGE_VAL) { |
| 263 | out = proj_coord_error(); /* in the 3D case +t_obs must be specified */ |
| 264 | proj_log_debug(P, "+dt must be specified"); |
| 265 | return out.xyz; |
| 266 | } |
| 267 | |
| 268 | shift = get_grid_shift(P, in.xyz); |
| 269 | if (shift.x == HUGE_VAL) { |
| 270 | return shift; |
| 271 | } |
| 272 | |
| 273 | out.xyz.x += Q->dt * shift.x; |
| 274 | out.xyz.y += Q->dt * shift.y; |
| 275 | out.xyz.z += Q->dt * shift.z; |
| 276 | |
| 277 | return out.xyz; |
| 278 | } |
| 279 | |
| 280 | |
| 281 | static PJ_COORD forward_4d(PJ_COORD in, PJ *P) { |
nothing calls this directly
no test coverage detected