> Full SurrealDB documentation index: https://surrealdb.com/docs/llms.txt

# Geometry types

Use GeoJSON-style geometry values in SurrealDB, including Point, LineString, Polygon, and collections, with longitude-before-latitude ordering.

SurrealDB’s `geometry` type follows the [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) model in which both (and only) a `type` and `coordinates` field must be specified. A tuple shorthand (e.g. `(50.0, 75.7)`) is also accepted when creating a `point`.

A GeoJSON object written in a query becomes a `geometry`. From SurrealDB 4.0, an object built at run time, such as one decoded from JSON, is also converted wherever only a `geometry` fits, as described in [Objects built at run time](/docs/reference/query-language/language-primitives/data-types/geometries.md#objects-built-at-run-time).

## Coordinate order

Points are defined with **longitude before latitude**, as required by the GeoJSON spec. Many map services display latitude first, so be sure to confirm the order when ingesting external data.

```surql
-- Full GeoJSON object form
CREATE city:london SET centre = {
    type: "Point",
    coordinates: [-0.118092, 51.509865],
};

-- Tuple shorthand for a point (lon, lat)
CREATE city:london SET centre = (-0.118092, 51.509865);
```

See the [Geometries](/docs/reference/query-language/language-primitives/data-types/geometries.md) reference for `LineString`, `Polygon`, `MultiPoint`, `MultiLineString`, `MultiPolygon`, and `Collection`, including examples for each type.

## Why geometry types matter

- **Points** capture a single location (venues, vehicles, users).
- **Line strings** represent paths (routes, boundaries along a corridor).
- **Polygons** represent regions (service areas, countries, floor plans projected to the globe).

Choosing the right type makes spatial predicates (`INTERSECTS`, `CONTAINS`, and so on) accurate.
