PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ ptarray_scale()

void ptarray_scale ( POINTARRAY pa,
const POINT4D fact 

Scale a pointarray.

Definition at line 1840 of file ptarray.c.

References getPoint4d_p(), LWDEBUG, POINT4D::m, POINTARRAY::npoints, ptarray_set_point4d(), POINT4D::x, POINT4D::y, and POINT4D::z.

Referenced by lwgeom_scale(), and test_ptarray_scale().

1841 {
1842  uint32_t i;
1843  POINT4D p4d;
1844  LWDEBUG(3, "ptarray_scale start");
1845  for (i=0; i<pa->npoints; i++)
1846  {
1847  getPoint4d_p(pa, i, &p4d);
1848  p4d.x *= fact->x;
1849  p4d.y *= fact->y;
1850  p4d.z *= fact->z;
1851  p4d.m *= fact->m;
1852  ptarray_set_point4d(pa, i, &p4d);
1853  }
1854  LWDEBUG(3, "ptarray_scale end");
1855 }
double x
Definition: liblwgeom.h:354
double m
Definition: liblwgeom.h:354
void ptarray_set_point4d(POINTARRAY *pa, uint32_t n, const POINT4D *p4d)
Definition: lwgeom_api.c:425
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
unsigned int uint32_t
Definition: uthash.h:78
double z
Definition: liblwgeom.h:354
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
Definition: lwgeom_api.c:113
double y
Definition: liblwgeom.h:354
uint32_t npoints
Definition: liblwgeom.h:373
Here is the call graph for this function:
Here is the caller graph for this function: