hyperspace
hyperspace · Four-dimensional point, box, and circle types with B-tree and SP-GiST/KD-tree operator classes.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101014 | hyperspace | hyperspace | 1.0 | GIS | Unknown | C |
PostgreSQL · 15
Usage
Sources:
hyperspace version 1.0 adds four-dimensional geometric types and indexes. Use it for points that need distance ordering or containment tests in a four-axis space.
Core Workflow
The default point4d_kd SP-GiST operator class supports equality, box or circle containment, and nearest-neighbor ordering with <->.
Objects and Caveats
The principal types are point4d, box4d, and circle4d. Constructors with the same names are available. Points support equality, addition, sum, and Euclidean distance. Containment uses <@ with the commutator @>.
point4d also has a default lexical B-tree class and an alternate magnitude-based point4d_abs_ops class. Text input is (x,y,z,w) for a point, two points for a box, and a point plus radius for a circle. These are custom C types; validate binary compatibility and query plans on the exact PostgreSQL build before storing durable data.