Affine transform a pointarray.
Definition at line 1796 of file ptarray.c.
1802 LWDEBUG(2,
"lwgeom_affine_ptarray start");
1814 p4d.
x = a->afac *
x + a->bfac *
y + a->cfac * z + a->xoff;
1815 p4d.
y = a->dfac *
x + a->efac *
y + a->ffac * z + a->yoff;
1816 p4d.
z = a->gfac *
x + a->hfac *
y + a->ifac * z + a->zoff;
1819 LWDEBUGF(3,
" POINT %g %g %g => %g %g %g",
x,
y, z, p4d.
x, p4d.
y, p4d.
z);
1824 LWDEBUG(3,
" doesn't have z");
1831 p4d.
x = a->afac *
x + a->bfac *
y + a->xoff;
1832 p4d.
y = a->dfac *
x + a->efac *
y + a->yoff;
1835 LWDEBUGF(3,
" POINT %g %g => %g %g",
x,
y, p4d.
x, p4d.
y);
1839 LWDEBUG(3,
"lwgeom_affine_ptarray end");
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
void ptarray_set_point4d(POINTARRAY *pa, uint32_t n, const POINT4D *p4d)
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
References AFFINE::afac, AFFINE::bfac, AFFINE::cfac, AFFINE::dfac, AFFINE::efac, AFFINE::ffac, POINTARRAY::flags, FLAGS_GET_Z, getPoint4d_p(), AFFINE::gfac, AFFINE::hfac, AFFINE::ifac, LWDEBUG, LWDEBUGF, POINTARRAY::npoints, ptarray_set_point4d(), POINT4D::x, pixval::x, AFFINE::xoff, POINT4D::y, pixval::y, AFFINE::yoff, POINT4D::z, and AFFINE::zoff.
Referenced by lwgeom_affine().