# Spatial points

[Wiki](../README.md) / [Spatial, temporal and decimal values](README.md)

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

**On this page**

- [Spatial: Point](#spatial-point)
  - [Construct](#construct)
  - [Fields](#fields)
  - [Distance](#distance)

## Spatial: `Point`

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

| SRID | CRS | Coordinates |
|---|---|---|
| 7203 | cartesian | `x, y` |
| 9157 | cartesian-3d | `x, y, z` |
| 4326 | wgs-84 (geographic) | `longitude, latitude` |
| 4979 | wgs-84-3d | `longitude, latitude, height` |

### Construct

```cypher
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

```cypher
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

```cypher
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](../indexes/spatial.md#point-spatial-index).

## Related articles

[Scalar functions](../cypher/functions.md) · [Indexes and constraints](../indexes/README.md)
