A new universe for your graph data.Meet Galactus DB
GALACTUS DB WIKIDeployment · Queries · Operations

Spatial points

Wiki / Spatial and temporal values

For WKB-backed shapes, overlays, relationship predicates and centroid, see Geometry and geography. This page describes legacy point().

On this page

Spatial: Point

A Point is a value type with a coordinate reference system (CRS) identified by an SRID.

SRIDCRSCoordinates
7203cartesianx, y
9157cartesian-3dx, y, z
4326wgs-84 (geographic)longitude, latitude
4979wgs-84-3dlongitude, latitude, height

Construct

RETURN point({x: 3, y: 4});                              // cartesian (SRID 7203)
RETURN point({x: 1, y: 2, z: 3});                        // cartesian-3d (9157)
RETURN point({longitude: -0.12, latitude: 51.50});      // WGS-84 (4326)
RETURN point({longitude: -0.12, latitude: 51.50, height: 10});  // WGS-84-3d (4979)

The CRS is inferred from the keys: x/y/z → cartesian; longitude/ latitude/height → WGS-84.

Fields

WITH point({longitude: -0.12, latitude: 51.5}) AS p
RETURN p.longitude, p.latitude, p.srid, p.crs;          // p.x/p.y/p.z and p.height also work

Distance

RETURN distance(point({x: 0, y: 0}), point({x: 3, y: 4}));     // 5.0 (Euclidean)
RETURN point.distance(point({x: 0, y: 0}), point({x: 3, y: 4}));  // same; dotted alias

// geographic points use the haversine formula; the result is in METRES:
RETURN distance(
  point({longitude: -0.1278, latitude: 51.5074}),       // London
  point({longitude:  2.3522, latitude: 48.8566})        // Paris
) AS metres;

Points are storable as properties, persisted, and sent over Bolt as Point2D/ Point3D structures, decoded as point types by the native drivers. They can be indexed — see Spatial indexes.

Scalar functions · Indexes and constraints

Planning a deployment? Review compatibility and licence setup for your instance.