Skip to content

Geo

@Serializable(with = Geo.Serializer::class)
sealed class Geo

GeoJSON types supported by MongoDB.

Our goal is to represent the GeoJSON RFC, as it is implemented by MongoDB. MongoDB does not support large sections of the RFC, so we won't support them either.

GeoJSON operators calculate on a sphere, using the WGS84 reference system.

External resources

Inheritors

Types

GeometryCollection

A GeoJSON geometry collection.

Latitude

@JvmInline
value class Latitude(val degrees: Double)

A latitude.

LineString

A GeoJSON line string.

Longitude

@JvmInline
value class Longitude(val degrees: Double)

A longitude.

MultiLineString

A GeoJSON MultiLineString.

MultiPoint

A GeoJSON MultiPoint.

MultiPolygon

A GeoJSON MultiPolygon.

Point

A GeoJSON point.

Polygon

A GeoJSON polygon.

Serializer