Utm class

UTM coordinates, with functions to parse them and convert them to geographic points.

The UTM zone object contains the longitudinal zone (1..60) and the hemisphere.

Easting is in metres from the false easting (-500km from the central meridian).

Northing is in metres from the equator (N) or from the false northing -10,000km (S).

2D positions are constructed as Projected(x: easting, y: northing) and 3D positions as Projected(x: easting, y: northing, z: elev).

The datum indicates the geodetic reference (ie. ellipsoid and other parameters) used when projecting geographic coordinates to projected coordinates.

See also Universal Transverse Mercator in Wikipedia for more information.

See also UtmMeta for metadata related to UTM calculations.

Annotations
  • @immutable

Constructors

Utm.new(int lonZone, String hemisphere, double easting, double northing, {double? elev, double? m, Datum datum = Datum.WGS84, bool verifyEN = true})
Creates UTM coordinates with lonZone, hemisphere, easting, northing based on the datum.
factory
Utm.from(UtmZone utmZone, Projected projected, {Datum datum = Datum.WGS84, bool verifyEN = true})
Creates UTM coordinates from utmZone and the projected position based on the datum.
factory
Utm.fromGeographic(Geographic geographic, {UtmZone? zone, Datum datum = Datum.WGS84, bool roundResults = true, bool verifyEN = true})
Creates projected UTM coordinates by converting it from a geographic position based on the datum.
factory
Utm.parse(String text, {Pattern? delimiter, bool swapXY = false, Datum datum = Datum.WGS84, bool verifyEN = true})
Parses projected UTM coordinates from text, by default in the following order: zone, hemisphere, easting, northing (ie. 31 N 448251 5411932).
factory

Properties

datum Datum
The datum used for calculations with a reference ellipsoid and datum transformation parameters.
final
easting double
The easting (x) in metres from the false easting (-500km from the central meridian).
no setter
hashCode int
The hash code for this object.
no setteroverride
northing double
The northing (y) in metres from the equator (N) or from the false northing -10,000km (S).
no setter
projected Projected
The projected position as UTM coordinates (x=easting, y=northing, z=elev) in the specified zone.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
zone UtmZone
The UTM zone object with the longitudinal zone (1..60) and the hemisphere.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toGeographic({bool roundResults = true}) Geographic
Converts UTM coordinates of this and represented by zone and projected based on the datum to a geographic position.
toGeographicMeta({bool roundResults = true}) UtmMeta<Geographic>
Converts UTM coordinates of this and represented by zone and projected based on the datum to a geographic position.
toMgrs() Mgrs
Converts UTM coordinates of this to the MGRS grid reference.
toString() String
A string representation of this object.
override
toText({String delimiter = ' ', int decimals = 0, bool compactNums = true, bool swapXY = false, bool formatAlsoElevM = false, bool zeroPadZone = false}) String
The UTM coordinate string representation with values separated by delimiter (default is whitespace).

Operators

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

Static Methods

fromGeographicMeta(Geographic geographic, {UtmZone? zone, Datum datum = Datum.WGS84, bool roundResults = true, bool verifyEN = true}) UtmMeta<Utm>
Creates projected UTM coordinates wrapped inside metadata object by converting it from a geographic position based on the datum.