Snap to grid.
Definition at line 1986 of file ptarray.c.
1987{
1988 uint32_t i, j = 0;
1993
1994 LWDEBUGF(2,
"%s called on %p", __func__, pa);
1995
1996 for (i = 0; i < pa->
npoints; i++)
1997 {
1998
2000
2001 if (grid->
xsize > 0)
2002 {
2004 }
2005
2006 if (grid->
ysize > 0)
2007 {
2009 }
2010
2011
2012
2013 if (has_z)
2014 {
2015 if (grid->
zsize > 0)
2017 }
2018
2019 if (has_m)
2020 {
2021
2022 if (grid->
msize > 0 && !has_z)
2024
2025 if (grid->
msize > 0 && has_z)
2027 }
2028
2029
2032 && (ndims > 3 ?
FP_EQUALS(p_out->m, p->m) : 1) )
2033 {
2034 continue;
2035 }
2036
2037
2041 if (ndims > 2)
2043 if (ndims > 3)
2045 }
2046
2047
2049 return;
2050}
#define FLAGS_GET_Z(flags)
#define FLAGS_NDIMS(flags)
#define FLAGS_GET_M(flags)
#define LWDEBUGF(level, msg,...)
static uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)
References POINTARRAY::flags, FLAGS_GET_M, FLAGS_GET_Z, FLAGS_NDIMS, FP_EQUALS, getPoint_internal(), gridspec_t::ipm, gridspec_t::ipx, gridspec_t::ipy, gridspec_t::ipz, LWDEBUGF, POINT4D::m, gridspec_t::msize, POINTARRAY::npoints, POINT4D::x, gridspec_t::xsize, POINT4D::y, gridspec_t::ysize, POINT4D::z, and gridspec_t::zsize.
Referenced by lwgeom_grid_in_place().