GeoPoint

data class GeoPoint(@FloatRange(from = -90.0, to = 90.0) val latitude: Double, @FloatRange(from = -180.0, to = 180.0) val longitude: Double) : Parcelable

The implementation of geographic coordinates.

Parameters

latitude

Latitude value. It should be between -90.0 and 90.0.

longitude

Longitude value. It should be between -180.0 and 180.0.

Constructors

Link copied to clipboard
constructor(@FloatRange(from = -90.0, to = 90.0) latitude: Double, @FloatRange(from = -180.0, to = 180.0) longitude: Double)

Functions

Link copied to clipboard
fun angleTo(other: GeoPoint): Angle

Calculates the angle (bearing) between this GeoPoint and the GeoPoint given as an argument.

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard

Calculates the geographic distance from this GeoPoint to the GeoPoint given as an argument.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun fractionTo(other: GeoPoint, distance: Distance): Double

Calculates the fraction between this GeoPoint and the GeoPoint comparing to the total distance.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Calculates a GeoPoint between this GeoPoint and the GeoPoint given as an argument.

Link copied to clipboard
fun toPlainString(coordinateSeparator: String): String

Renders a GeoPoint as a string.

Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard
Link copied to clipboard