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

◆ Span_quadtree_choose()

Datum Span_quadtree_choose ( PG_FUNCTION_ARGS  )

Determine which quadrant a 2D-mapped span falls into, relative to the centroid.

SP-GiST choose function for span types.

Quadrants are numbered as follows:

3 | 0
----+----
2 | 1

where the lower bound of span is the horizontal axis and upper bound the vertical axis.

Periods on one of the axes are taken to lie in the quadrant with higher value along perpendicular axis. That is, a value on the horizontal axis is taken to belong to quadrant 0 or 3, and a value on the vertical axis is taken to belong to quadrant 0 or 1. A span equal to centroid is taken to lie in quadrant 0.