PostGIS  2.1.10dev-r@@SVN_REVISION@@
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 96 of file lwgeom_rtree.c.

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

Referenced by RTreeCreateInteriorNode().

97 {
98  RTREE_INTERVAL *interval;
99 
100  POSTGIS_DEBUGF(2, "RTreeMergeIntervals called with %p, %p", inter1, inter2);
101 
102  interval = lwalloc(sizeof(RTREE_INTERVAL));
103  interval->max = FP_MAX(inter1->max, inter2->max);
104  interval->min = FP_MIN(inter1->min, inter2->min);
105 
106  POSTGIS_DEBUGF(3, "interval min = %8.3f, max = %8.3f", interval->min, interval->max);
107 
108  return interval;
109 }
#define FP_MIN(A, B)
Representation for the y-axis interval spanned by an edge.
Definition: lwgeom_rtree.h:9
void * lwalloc(size_t size)
Definition: lwutil.c:175
#define FP_MAX(A, B)

Here is the call graph for this function:

Here is the caller graph for this function: