fromUtmOrNull

fun fromUtmOrNull(coordinates: String, spatialReference: SpatialReference?, utmConversionMode: UtmConversionMode): Point?

Parses a coordinate in Universal Transverse Mercator (UTM) notation, and returns a Point representing that location. The spatial reference provided must have an ellipsoid and datum matching those used by the source of the UTM string. If no spatial reference is provided, it is assumed the UTM string is referenced to WGS 84. The UTM string can contain leading and trailing whitespace and can have whitespace between the zone and latitude designator and the numerical eastings and northings.

UTM notation examples
30U 489885 6199877
30U4898856199877
30N 489885 6199877 (using N/S indicator)
489885.32,6199877.36,30U (this form supports sub-meter precision)
Returns null on error, including when the given string is not valid UTM notation.

Return

A point with the location from the UTM string in the spatial reference provided.

Since

200.1.0

Parameters

coordinates

The UTM notation string for the coordinate.

spatialReference

A spatial reference that defines the datum and ellipsoid referenced by the UTM coordinate.

utmConversionMode

The latitude notation scheme used by the given UTM coordinate, either a latitudinal band, or a hemisphere designator.

See also