MobilityDB 1.3
Loading...
Searching...
No Matches

◆ node_insert()

static void node_insert ( RTree rtree,
void *  node_bounding_box,
RTreeNode node,
void *  new_box,
int  id,
bool split 
)
static

Inserts a new bounding box into an RTree node and handles node splitting if necessary.

If the node is a leaf and already contains the maximum number of items (MAXITEMS), the function sets the split flag to true to indicate that the node needs to be split. For non-leaf nodes, the function determines the appropriate child node for insertion and recursively inserts the bounding box. If splitting occurs, the function handles the split and updates the parent node's bounding boxes.

Parameters
[in]rtreePointer to the RTree structure that provides axis value retrieval and node splitting functions
[in]node_bounding_boxPointer to the bounding bounding box of all the bounding boxes in node
[in]nodePointer to the node where the bounding box is being inserted
[in]new_boxPointer to the bounding box to be inserted
[in]idIdentifier associated with the new bounding box (used only for leaf nodes)
[out]splitPointer to a boolean flag that indicates if the node was split during insertion