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

◆ tboxnode_quadtree_next()

static void tboxnode_quadtree_next ( const TboxNode nodebox,
const TBox centroid,
uint8  quadrant,
TboxNode next_nodebox 
)
static

Calculate the next traversal value.

All centroids are bounded by TboxNode, but SP-GiST only keeps boxes. When we are traversing the tree, we must calculate TboxNode, using centroid and quadrant.

Continuing with the example at the top of this file

| |
| 1110 | 1111
| -----+-----
| 1100 | 1101
| |
-------------+-------------
|
|
|
|
Datum centroid(PG_FUNCTION_ARGS)

where centroid is as follows

c1 = TBOXFLOAT XT([3, 5],[2001-01-03, 2001-01-05])
centroid = TBOXFLOAT XT([3, 5],[2001-01-03, 2001-01-05])

The next traversal value of quadrant ´1111´ is

left = TBOXFLOAT XT([3, +inf),[2001-01-03, +inf))
right = TBOXFLOAT XT([5, +inf),[2001-01-05, +inf))

Also, the traversal value of quadrant ´1100´ is

left = TBOXFLOAT XT([3, +inf),(-inf, 2001-01-03))
right = TBOXFLOAT XT([5, +inf),(-inf, 2001-01-05))