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};
522 PJ_COORD t = proj_trans(pj->
pj, PJ_FWD, (PJ_COORD)v);
524 int pj_errno_val = proj_errno(pj->
pj);
527 lwerror(
"transform: %s (%d)", proj_errno_string(pj_errno_val), pj_errno_val);
530 pa_double[0] = ((PJ_XYZT)t.xyzt).x;
531 pa_double[1] = ((PJ_XYZT)t.xyzt).y;
533 pa_double[2] = ((PJ_XYZT)t.xyzt).z;
545 n_converted = proj_trans_generic(pj->
pj,
553 has_z ? pa_double + 2 : NULL,
554 has_z ? point_size : 0,
555 has_z ? n_points : 0,
561 if (n_converted != n_points)
563 lwerror(
"ptarray_transform: converted (%d) != input (%d)", n_converted, n_points);
567 int pj_errno_val = proj_errno(pj->
pj);
570 lwerror(
"transform: %s (%d)", proj_errno_string(pj_errno_val), pj_errno_val);
579 if (proj_angular_output(pj->
pj, PJ_FWD))
581 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