Snap to grid.
Definition at line 2234 of file ptarray.c.
2235{
2236 uint32_t j = 0;
2238 double x,
y, z = 0, m = 0;
2242
2243 for (uint32_t i = 0; i < pa->
npoints; i++)
2244 {
2245
2249 if (ndims > 2)
2251 if (ndims > 3)
2253
2254
2255
2256
2257
2258
2259 if (grid->
xsize > 0) {
2260 if (grid->
xsize < 1)
2262 else
2264 }
2265
2266 if (grid->
ysize > 0) {
2267 if (grid->
ysize < 1)
2269 else
2271 }
2272
2273
2274
2275 if (has_z && grid->
zsize > 0)
2277
2278
2279 if (has_m && grid->
msize > 0)
2280 {
2281
2282 if (has_z)
2284 else
2286 }
2287
2288
2289 if (p_out &&
2292 (ndims > 2 ? p_out->
z == z : 1) &&
2293 (ndims > 3 ? p_out->m == m : 1))
2294 {
2295 continue;
2296 }
2297
2298
2302 if (ndims > 2)
2304 if (ndims > 3)
2306 }
2307
2308
2310 return;
2311}
#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().