Geometry

@Serializable(with = GeometrySerializer::class)
sealed interface Geometry : GeoJsonObject(source)

A Geometry object represents points, curves, and surfaces in coordinate space.

See RFC 7946 Section 3.1 for the full specification.

Inheritors

Types

Link copied to clipboard
object Companion

Factory methods for creating and serializing Geometry objects.

Properties

Link copied to clipboard
abstract val bbox: BoundingBox?

An optional BoundingBox used to represent the limits of the object's Geometry.

Link copied to clipboard

Additional members as defined in RFC 7946 §6.1. Empty when none are present. JSON encode flattens these as sibling keys. CBOR and Protobuf drop them.

Functions

Link copied to clipboard
inline fun <T : Any> GeoJsonObject.decodeForeignMembers(json: Json = GeoJson.jsonFormat): T
Link copied to clipboard

Returns the foreign member with the given key, or null if it is not present.