PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ rect_node_internal_add_node()

static void rect_node_internal_add_node ( RECT_NODE node,
RECT_NODE add 
)
static

Definition at line 556 of file lwtree.c.

557 {
558  if (rect_node_is_leaf(node))
559  lwerror("%s: call on leaf node", __func__);
560  node->xmin = FP_MIN(node->xmin, add->xmin);
561  node->xmax = FP_MAX(node->xmax, add->xmax);
562  node->ymin = FP_MIN(node->ymin, add->ymin);
563  node->ymax = FP_MAX(node->ymax, add->ymax);
564  node->i.nodes[node->i.num_nodes++] = add;
565  return;
566 }
#define FP_MAX(A, B)
#define FP_MIN(A, B)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
static int rect_node_is_leaf(const RECT_NODE *node)
Definition: lwtree.c:31
struct rect_node * nodes[RECT_NODE_SIZE]
Definition: lwtree.h:61
double ymin
Definition: lwtree.h:71
double xmax
Definition: lwtree.h:70
double ymax
Definition: lwtree.h:72
RECT_NODE_INTERNAL i
Definition: lwtree.h:75
double xmin
Definition: lwtree.h:69

References FP_MAX, FP_MIN, rect_node::i, lwerror(), RECT_NODE_INTERNAL::nodes, RECT_NODE_INTERNAL::num_nodes, rect_node_is_leaf(), rect_node::xmax, rect_node::xmin, rect_node::ymax, and rect_node::ymin.

Referenced by rect_nodes_merge(), and rect_tree_from_lwcurvepoly().

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