506 if (proj_angular_input(pj->
pj, PJ_FWD))
508 for (i = 0; i < pa->
npoints; i++)
521 PJ_XYZT v = {pa_double[0], pa_double[1], has_z ? pa_double[2] : 0.0, 0.0};
524 PJ_COORD t = proj_trans(pj->
pj, PJ_FWD, c);
526 int pj_errno_val = proj_errno_reset(pj->
pj);
529 lwerror(
"transform: %s (%d)", proj_errno_string(pj_errno_val), pj_errno_val);
532 pa_double[0] = (t.xyzt).
x;
533 pa_double[1] = (t.xyzt).
y;
535 pa_double[2] = (t.xyzt).z;
547 n_converted = proj_trans_generic(pj->
pj,
555 has_z ? pa_double + 2 : NULL,
556 has_z ? point_size : 0,
557 has_z ? n_points : 0,
563 if (n_converted != n_points)
565 lwerror(
"ptarray_transform: converted (%d) != input (%d)", n_converted, n_points);
569 int pj_errno_val = proj_errno_reset(pj->
pj);
572 lwerror(
"transform: %s (%d)", proj_errno_string(pj_errno_val), pj_errno_val);
581 if (proj_angular_output(pj->
pj, PJ_FWD))
583 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 ptarray_swap_ordinates(POINTARRAY *pa, LWORD o1, LWORD o2)
Swap ordinate values o1 and o2 on a given POINTARRAY.
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