BoundingBox

constructor(west: Double, south: Double, east: Double, north: Double)(source)

Construct a 2D BoundingBox from west, south, east, and north coordinates.

Parameters

west

The western longitude boundary.

south

The southern latitude boundary.

east

The eastern longitude boundary.

north

The northern latitude boundary.


constructor(west: Double, south: Double, minAltitude: Double, east: Double, north: Double, maxAltitude: Double)(source)

Construct a 3D BoundingBox from west, south, east, north coordinates with altitude bounds.

Parameters

west

The western longitude boundary.

south

The southern latitude boundary.

minAltitude

The minimum altitude boundary.

east

The eastern longitude boundary.

north

The northern latitude boundary.

maxAltitude

The maximum altitude boundary.


constructor(southwest: Position, northeast: Position)(source)

Construct a BoundingBox from two Position objects that represent the southwest corner and northeast corners.

If one corner has more elements than the other, the extra elements are ignored.

Parameters

southwest

The southwestern corner Position.

northeast

The northeastern corner Position.


constructor(west: Double, south: Double, minAltitude: Double, east: Double, north: Double, maxAltitude: Double, vararg additionalElements: Double)(source)

Construct a BoundingBox with more than the standard three axes (longitude, latitude, altitude) per corner.

As noted in RFC 7946 Section 3.1.1, such additional axes are discouraged but allowed by the GeoJSON specification:

Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values.

Parameters

west

The western longitude boundary.

south

The southern latitude boundary.

minAltitude

The minimum altitude boundary.

east

The eastern longitude boundary.

north

The northern latitude boundary.

maxAltitude

The maximum altitude boundary.

additionalElements

Additional coordinate elements beyond the standard three axes per corner (must contain an even number of elements).

Throws

if additionalElements contains an odd number of elements.