MGRS class

Military Grid Reference System (MGRS/NATO) grid references provides with methods to parse references, and to convert to UTM coordinates and latitude/longitude.

MGRS references comprise a grid zone designator, a 100km square identification, and an easting and northing (in metres); e.g. ‘31U DQ 48251 11932’.

Depending on requirements, some parts of the reference may be omitted (implied), and eastings/northings may be given to varying resolution.

Constructors

MGRS.new(int zone, String band, String e100k, String n100k, int easting, int northing)
Creates an Mgrs grid reference object.

Properties

band String
final
e100k String
final
easting int
final
hashCode int
The hash code for this object.
no setterinherited
n100k String
final
northing int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
zone int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toLatLng() LatLng
Converts UTM zone/easting/northing coordinate to latitude/longitude.
toString({int digits = 10}) String
Returns a string representation of an MGRS grid reference.
override
toUTM() UTM
Converts MGRS grid reference to UTM coordinate.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

parse(String mgrsGridRef) MGRS
Parses string representation of MGRS grid reference.