PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ RTreeMergeIntervals()

static RTREE_INTERVAL* RTreeMergeIntervals ( RTREE_INTERVAL inter1,
RTREE_INTERVAL inter2 
)
static

Creates an interval with the total extents of the two given intervals.

Definition at line 110 of file lwgeom_rtree.c.

References FP_MAX, FP_MIN, lwalloc(), RTREE_INTERVAL::max, and RTREE_INTERVAL::min.

Referenced by RTreeCreateInteriorNode().

111 {
112  RTREE_INTERVAL *interval;
113 
114  POSTGIS_DEBUGF(2, "RTreeMergeIntervals called with %p, %p", inter1, inter2);
115 
116  interval = lwalloc(sizeof(RTREE_INTERVAL));
117  interval->max = FP_MAX(inter1->max, inter2->max);
118  interval->min = FP_MIN(inter1->min, inter2->min);
119 
120  POSTGIS_DEBUGF(3, "interval min = %8.3f, max = %8.3f", interval->min, interval->max);
121 
122  return interval;
123 }
#define FP_MIN(A, B)
Representation for the y-axis interval spanned by an edge.
Definition: lwgeom_rtree.h:33
void * lwalloc(size_t size)
Definition: lwutil.c:229
#define FP_MAX(A, B)
Here is the call graph for this function:
Here is the caller graph for this function: