PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ nextRectBox()

static RectBox* nextRectBox ( RectBox rect_box,
BOX2DF *  centroid,
uint8  quadrant 
)
static

Definition at line 183 of file gserialized_spgist_2d.c.

184 {
185  RectBox *next_rect_box = (RectBox *)palloc(sizeof(RectBox));
186 
187  memcpy(next_rect_box, rect_box, sizeof(RectBox));
188 
189  if (quadrant & 0x8)
190  next_rect_box->left.xmin = centroid->xmin;
191  else
192  next_rect_box->left.xmax = centroid->xmin;
193 
194  if (quadrant & 0x4)
195  next_rect_box->right.xmin = centroid->xmax;
196  else
197  next_rect_box->right.xmax = centroid->xmax;
198 
199  if (quadrant & 0x2)
200  next_rect_box->left.ymin = centroid->ymin;
201  else
202  next_rect_box->left.ymax = centroid->ymin;
203 
204  if (quadrant & 0x1)
205  next_rect_box->right.ymin = centroid->ymax;
206  else
207  next_rect_box->right.ymax = centroid->ymax;
208 
209  return next_rect_box;
210 }
Datum centroid(PG_FUNCTION_ARGS)

References centroid(), RectBox::left, and RectBox::right.

Referenced by gserialized_spgist_inner_consistent_2d().

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