Skip to main content

Point

point holds a GeoJSON Point, a single position. Values can be written as GeoJSON or as WKT and are stored in one internal format. Responses contain GeoJSON, or WKT if the request asks for it with Prefer: geometry=wkt, see GeoJSON.

Note: geo values are only recognized for properties which the schema defines as point. Without a definition, a GeoJSON object is stored as a plain object and a WKT string as a plain string, without validation, conversion or geo index.

Expressions

Schema rules and search expressions see values of this type as GeoJSON, also if they were written as WKT. The geo functions work on them: geoDistance(document.location, geoPoint(13.4, 52.5)) measures the distance in meters, geoLon and geoLat read the coordinates.

Settings

SettingMeaning
dimensions2 (default) for [longitude, latitude], 3 for [longitude, latitude, altitude]. Every position of a value has to have this many coordinates.

The settings of every property apply as well.

Storage

DatabaseStored asNotes
MongoDBGeoJSON object(default), with a 2dsphere index for the intent geo
Neo4jnative POINT (WGS 84, 2D or 3D)with "storage": "graph"
Elasticsearchgeo_pointsearch copy

The search copy is written unless the property or the type sets "search": false. Where a property is stored is explained in placement.

Indices

geo, see geo indices: a 2dsphere index of MongoDB, or a point index of Neo4j for a point which is stored in Neo4j. A raw point index with own options is available as well, see raw Neo4j indices.

Limits

Positions are [longitude, latitude] in WGS 84 (longitude -180 to 180, latitude -90 to 90), longitude first, unlike most map UIs, which show latitude first. MongoDB documents are limited to 16 MB, which limits the number of positions, see MongoDB.

Example

Schema:

{
"type": "point",
"index": "geo"
}
FormatInputOutput
GeoJSON{"type": "Point", "coordinates": [13.4, 52.5]}{"type": "Point", "coordinates": [13.4, 52.5]}, the default
WKT"POINT (13.4 52.5)""POINT (13.4 52.5)" with Prefer: geometry=wkt