268 if (proj_angular_input(pj->
pj, PJ_FWD))
270 for (i = 0; i < pa->
npoints; i++)
280 PJ_XYZT v = {pa_double[0], pa_double[1], has_z ? pa_double[2] : 0.0, 0.0};
283 PJ_COORD t = proj_trans(pj->
pj, PJ_FWD, c);
285 int pj_errno_val = proj_errno_reset(pj->
pj);
288 lwerror(
"transform: %s (%d)", proj_errno_string(pj_errno_val), pj_errno_val);
291 pa_double[0] = (t.xyzt).
x;
292 pa_double[1] = (t.xyzt).
y;
294 pa_double[2] = (t.xyzt).z;
306 n_converted = proj_trans_generic(pj->
pj,
314 has_z ? pa_double + 2 : NULL,
315 has_z ? point_size : 0,
316 has_z ? n_points : 0,
322 if (n_converted != n_points)
324 lwerror(
"ptarray_transform: converted (%d) != input (%d)", n_converted, n_points);
328 int pj_errno_val = proj_errno_reset(pj->
pj);
331 lwerror(
"transform: %s (%d)", proj_errno_string(pj_errno_val), pj_errno_val);
337 if (proj_angular_output(pj->
pj, PJ_FWD))
339 for (i = 0; i < pa->
npoints; i++)
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
int ptarray_has_z(const POINTARRAY *pa)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static size_t ptarray_point_size(const POINTARRAY *pa)
uint8_t * serialized_pointlist