PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ nextRectBox()

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

Definition at line 182 of file gserialized_spgist_2d.c.

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