PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ getOctant()

static uint8 getOctant ( const BOX3D centroid,
const BOX3D inBox 
)
static

Definition at line 159 of file gserialized_spgist_3d.c.

160{
161 uint8 octant = 0;
162
163 if (inBox->xmin > centroid->xmin)
164 octant |= 0x20;
165
166 if (inBox->xmax > centroid->xmax)
167 octant |= 0x10;
168
169 if (inBox->ymin > centroid->ymin)
170 octant |= 0x08;
171
172 if (inBox->ymax > centroid->ymax)
173 octant |= 0x04;
174
175 if (inBox->zmin > centroid->zmin)
176 octant |= 0x02;
177
178 if (inBox->zmax > centroid->zmax)
179 octant |= 0x01;
180
181 return octant;
182}
Datum centroid(PG_FUNCTION_ARGS)
double xmax
Definition liblwgeom.h:340
double zmin
Definition liblwgeom.h:339
double ymax
Definition liblwgeom.h:340
double ymin
Definition liblwgeom.h:339
double zmax
Definition liblwgeom.h:340
double xmin
Definition liblwgeom.h:339

References centroid(), BOX3D::xmax, BOX3D::xmin, BOX3D::ymax, BOX3D::ymin, BOX3D::zmax, and BOX3D::zmin.

Referenced by gserialized_spgist_choose_3d(), and gserialized_spgist_picksplit_3d().

Here is the call graph for this function:
Here is the caller graph for this function: