Snap to grid.
Definition at line 2222 of file ptarray.c.
2223{
2224 uint32_t j = 0;
2226 double x,
y, z = 0, m = 0;
2230
2231 for (uint32_t i = 0; i < pa->
npoints; i++)
2232 {
2233
2237 if (ndims > 2)
2239 if (ndims > 3)
2241
2242
2243
2244
2245
2246
2247 if (grid->
xsize > 0) {
2248 if (grid->
xsize < 1)
2250 else
2252 }
2253
2254 if (grid->
ysize > 0) {
2255 if (grid->
ysize < 1)
2257 else
2259 }
2260
2261
2262
2263 if (has_z && grid->
zsize > 0)
2265
2266
2267 if (has_m && grid->
msize > 0)
2268 {
2269
2270 if (has_z)
2272 else
2274 }
2275
2276
2277 if (p_out &&
2280 (ndims > 2 ? p_out->
z == z : 1) &&
2281 (ndims > 3 ? p_out->m == m : 1))
2282 {
2283 continue;
2284 }
2285
2286
2290 if (ndims > 2)
2292 if (ndims > 3)
2294 }
2295
2296
2298 return;
2299}
#define FLAGS_GET_Z(flags)
#define FLAGS_NDIMS(flags)
#define FLAGS_GET_M(flags)
static uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)
References POINTARRAY::flags, FLAGS_GET_M, FLAGS_GET_Z, FLAGS_NDIMS, getPoint_internal(), gridspec_t::ipm, gridspec_t::ipx, gridspec_t::ipy, gridspec_t::ipz, POINT4D::m, gridspec_t::msize, POINTARRAY::npoints, POINT4D::x, gridspec_t::xscale, gridspec_t::xsize, POINT4D::y, gridspec_t::yscale, gridspec_t::ysize, POINT4D::z, and gridspec_t::zsize.
Referenced by lwgeom_grid_in_place().