Position

constructor(longitude: Double, latitude: Double)(source)

Construct a Position with longitude and latitude.

Parameters

longitude

The longitude value in degrees.

latitude

The latitude value in degrees.


constructor(longitude: Double, latitude: Double, altitude: Double)(source)

Construct a Position with longitude, latitude, and altitude.

Parameters

longitude

The longitude value in degrees.

latitude

The latitude value in degrees.

altitude

The altitude value in meters.


constructor(longitude: Double, latitude: Double, altitude: Double? = null)(source)

Construct a Position with longitude, latitude, and optional altitude.

Parameters

longitude

The longitude value in degrees.

latitude

The latitude value in degrees.

altitude

The altitude value in meters, or null if not specified.


constructor(longitude: Double, latitude: Double, altitude: Double, vararg additionalElements: Double)(source)

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

As noted in RFC 7946 Section 3.1.1:

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

longitude

The longitude value in degrees.

latitude

The latitude value in degrees.

altitude

The altitude value in meters.

additionalElements

Additional coordinate elements beyond the standard three axes.