Definition at line 1890 of file ptarray.c.
References POINTARRAY::flags, FLAGS_GET_M, FLAGS_GET_Z, getPoint4d_p(), gridspec_t::ipm, gridspec_t::ipx, gridspec_t::ipy, gridspec_t::ipz, LW_FALSE, LWDEBUGF, POINT4D::m, gridspec_t::msize, POINTARRAY::npoints, ptarray_append_point(), ptarray_construct_empty(), POINT4D::x, gridspec_t::xsize, POINT4D::y, gridspec_t::ysize, POINT4D::z, and gridspec_t::zsize.
Referenced by lwcircstring_grid(), lwline_grid(), lwpoint_grid(), and lwpoly_grid().
1896 LWDEBUGF(2,
"ptarray_grid called on %p", pa);
1900 for (ipn=0; ipn<pa->
npoints; ++ipn)
1906 pt.
x = rint((pt.
x - grid->
ipx)/grid->
xsize) *
1910 pt.
y = rint((pt.
y - grid->
ipy)/grid->
ysize) *
1914 pt.
z = rint((pt.
z - grid->
ipz)/grid->
zsize) *
1918 pt.
m = rint((pt.
m - grid->
ipm)/grid->
msize) *
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int repeated_points)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE, then a duplicate point will not be added.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
#define FLAGS_GET_M(flags)
#define LWDEBUGF(level, msg,...)
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point)