BoundingBox

@Serializable(with = BoundingBoxSerializer::class)
class BoundingBox(val coordinates: DoubleArray)

Represents an area bounded by a northeast and southwest.

A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections.

When serialized, a BoundingBox is represented as an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the northeasterly point. The axes order of a BoundingBox follow the axes order of geometries.

For the BoundingBox to be serialized in 3D form, both Positions must have a defined altitude.

See also

Constructors

Link copied to clipboard
constructor(west: Double, south: Double, east: Double, north: Double)
constructor(coordinates: List<Double>)
constructor(west: Double, south: Double, minAltitude: Double, east: Double, north: Double, maxAltitude: Double)
constructor(southwest: Position, northeast: Position)
constructor(coordinates: DoubleArray)

Properties

Link copied to clipboard

The GeoJSON bounding box coordinate array

Link copied to clipboard
Link copied to clipboard

The northeastern corner of the BoundingBox

Link copied to clipboard

The southwestern corner of the BoundingBox

Functions

Link copied to clipboard
operator fun component1(): Position
Link copied to clipboard
operator fun component2(): Position
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun json(): String
Link copied to clipboard
open override fun toString(): String