Companion

object Companion

Properties

Link copied to clipboard

Pattern that recognises the canonical MGRS textual form on uppercased input — Grid Zone Designator (1–2 digits + band letter) followed by a 100 km square (two letters) and one or two digit groups for easting/northing. Used by Location.fromString to dispatch to fromString.

Functions

Link copied to clipboard
fun fromLatLon(latitude: Angle, longitude: Angle): MGRSCoord

Create a MGRS coordinate from a pair of latitude and longitude Angle with the maximum precision of five digits (one meter).

fun fromLatLon(latitude: Angle, longitude: Angle, precision: Int): MGRSCoord

Create a MGRS coordinate from a pair of latitude and longitude Angle with the given precision or number of digits (1 to 5).

Link copied to clipboard

Create a MGRS coordinate from a standard MGRS coordinate text string.