ArcGISCoordinateFormatter

Namespace: Esri::GameEngine::Geometry
Class: Esri/GameEngine/Geometry/ArcGISCoordinateFormatter
Since: 1.0.0

Summary

Converts between Points and formatted coordinate notation strings such as decimal degrees; degrees, minutes, and seconds; U.S. National Grid (USNG); and Military Grid Reference System (MGRS).

Methods

SignatureReturn TypeSummary

FromGARS(const FString&, const ArcGISSpatialReference&, ArcGISGARSConversionMode)

ArcGISPoint

Parses a coordinate in Global Area Reference System (GARS) notation, and returns a Point representing that location.

FromGeoRef(const FString&, const ArcGISSpatialReference&)

ArcGISPoint

Parses a coordinate in World Geographic Reference System (GEOREF) notation, and returns a Point representing that location.

FromLatitudeLongitude(const FString&, const ArcGISSpatialReference&)

ArcGISPoint

Parses a coordinate in latitude-longitude notation, and returns a Point representing that location. The coordinate may use decimal degrees, degrees and decimal minutes, or degrees, minutes, and seconds format.

FromMGRS(const FString&, const ArcGISSpatialReference&, ArcGISMGRSConversionMode)

ArcGISPoint

Parses a coordinate in Military Grid Reference System (MGRS) notation, and returns a Point representing that location.

FromUSNG(const FString&, const ArcGISSpatialReference&)

ArcGISPoint

Parses a coordinate in United States National Grid (USNG) notation, and returns a Point representing that location.

FromUTM(const FString&, const ArcGISSpatialReference&, ArcGISUTMConversionMode)

ArcGISPoint

Parses a coordinate in Universal Transverse Mercator (UTM) notation, and returns a Point representing that location.

ToGARS(const ArcGISPoint&)

FString

Returns a formatted coordinate in Global Area Reference System (GARS) notation representing the given point's location.

ToGeoRef(const ArcGISPoint&, int32_t)

FString

Returns a formatted coordinate in World Geographic Reference System (GEOREF) notation representing the given point's location.

ToLatitudeLongitude(const ArcGISPoint&, ArcGISLatitudeLongitudeFormat, int32_t)

FString

Returns a formatted coordinate in latitude-longitude notation representing the given point's location.

ToMGRS(const ArcGISPoint&, ArcGISMGRSConversionMode, int32_t, bool)

FString

Returns a formatted coordinate in Military Grid Reference System (MGRS) notation representing the given point's location.

ToUSNG(const ArcGISPoint&, int32_t, bool)

FString

Returns a formatted coordinate in United States National Grid (USNG) notation representing the given point's location.

ToUTM(const ArcGISPoint&, ArcGISUTMConversionMode, bool)

FString

Returns a formatted coordinate in Universal Transverse Mercator (UTM) notation representing the given point's location.

FromGARS

static ArcGISPoint FromGARS(const FString& coordinates, const ArcGISSpatialReference& spatialReference, ArcGISGARSConversionMode GARSConversionMode)

Parses a coordinate in Global Area Reference System (GARS) notation, and returns a Point representing that location.

Since 1.0.0

Arguments
NameTypeConstSummary
coordinates
Yes

The GARS notation string for the coordinate.

spatialReference
Yes

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

GARSConversionMode
No

Select whether the returned point's location represents the south-west corner of the GARS cell the coordinate lies within, or its center.

Returns ArcGISPoint

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

FromGeoRef

static ArcGISPoint FromGeoRef(const FString& coordinates, const ArcGISSpatialReference& spatialReference)

Parses a coordinate in World Geographic Reference System (GEOREF) notation, and returns a Point representing that location.

Since 1.0.0

Arguments
NameTypeConstSummary
coordinates
Yes

The GEOREF notation string for the coordinate.

spatialReference
Yes

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

Returns ArcGISPoint

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

FromLatitudeLongitude

static ArcGISPoint FromLatitudeLongitude(const FString& coordinates, const ArcGISSpatialReference& spatialReference)

Parses a coordinate in latitude-longitude notation, and returns a Point representing that location. The coordinate may use decimal degrees, degrees and decimal minutes, or degrees, minutes, and seconds format.

Since 1.0.0

Arguments
NameTypeConstSummary
coordinates
Yes

The latitude-longitude notation string for the coordinate.

spatialReference
Yes

A spatial reference that defines the datum and ellipsoid referenced by the latitude-longitude coordinate.

Returns ArcGISPoint

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

FromMGRS

static ArcGISPoint FromMGRS(const FString& coordinates, const ArcGISSpatialReference& spatialReference, ArcGISMGRSConversionMode MGRSConversionMode)

Parses a coordinate in Military Grid Reference System (MGRS) notation, and returns a Point representing that location.

Since 1.0.0

Arguments
NameTypeConstSummary
coordinates
Yes

The MGRS notation string for the coordinate.

spatialReference
Yes

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

MGRSConversionMode
No

The mode used by the given MGRS coordinates.

Returns ArcGISPoint

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

FromUSNG

static ArcGISPoint FromUSNG(const FString& coordinates, const ArcGISSpatialReference& spatialReference)

Parses a coordinate in United States National Grid (USNG) notation, and returns a Point representing that location.

Since 1.0.0

Arguments
NameTypeConstSummary
coordinates
Yes

The USNG notation string for the coordinate.

spatialReference
Yes

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

Returns ArcGISPoint

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

FromUTM

static ArcGISPoint FromUTM(const FString& coordinates, const ArcGISSpatialReference& spatialReference, ArcGISUTMConversionMode UTMConversionMode)

Parses a coordinate in Universal Transverse Mercator (UTM) notation, and returns a Point representing that location.

Since 1.0.0

Arguments
NameTypeConstSummary
coordinates
Yes

The UTM notation string for the coordinate.

spatialReference
Yes

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

UTMConversionMode
No

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

Returns ArcGISPoint

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

ToGARS

static FString ToGARS(const ArcGISPoint& point)

Returns a formatted coordinate in Global Area Reference System (GARS) notation representing the given point's location.

Since 1.0.0

Arguments
NameTypeConstSummary
point
Yes

The location to be represented in GARS notation.

Returns FString

A GARS notation string representing the GARS cell containing the given point.

ToGeoRef

static FString ToGeoRef(const ArcGISPoint& point, int32_t precision)

Returns a formatted coordinate in World Geographic Reference System (GEOREF) notation representing the given point's location.

Since 1.0.0

Arguments
NameTypeConstSummary
point
Yes

The location to be represented in GEOREF notation.

precision
No

The precision with which to represent the coordinate.

Returns FString

A GEOREF notation string representing the position of the given point.

ToLatitudeLongitude

static FString ToLatitudeLongitude(const ArcGISPoint& point, ArcGISLatitudeLongitudeFormat format, int32_t decimalPlaces)

Returns a formatted coordinate in latitude-longitude notation representing the given point's location.

Since 1.0.0

Arguments
NameTypeConstSummary
point
Yes

The location to be represented as a formatted latitude-longitude string.

format
No

The mode to use when formatting the latitude-longitude string.

decimalPlaces
No

The number of decimal places to use.

Returns FString

A string representing the latitude-longitude of the given point.

ToMGRS

static FString ToMGRS(const ArcGISPoint& point, ArcGISMGRSConversionMode MGRSConversionMode, int32_t precision, bool addSpaces)

Returns a formatted coordinate in Military Grid Reference System (MGRS) notation representing the given point's location.

Since 1.0.0

Arguments
NameTypeConstSummary
point
Yes

The location to be represented in MGRS notation.

MGRSConversionMode
No

The mode to use for the returned MGRS notation string.

precision
No

The precision with which to represent the coordinate.

addSpaces
No

If false, the generated string contains no spaces. If true, a space separates the grid zone designator, the 100km square identifier, and the numerical easting and northing values.

Returns FString

An MGRS notation string representing the position of the given point.

ToUSNG

static FString ToUSNG(const ArcGISPoint& point, int32_t precision, bool addSpaces)

Returns a formatted coordinate in United States National Grid (USNG) notation representing the given point's location.

Since 1.0.0

Arguments
NameTypeConstSummary
point
Yes

The coordinate to be represented in MGRS notation.

precision
No

The precision with which to represent the coordinate.

addSpaces
No

If false, the generated string contains no spaces. If true, a space separates the grid zone designator, the 100km square identifier, and the numerical easting and northing values.

Returns FString

A USNG notation string representing the position of the given point.

ToUTM

static FString ToUTM(const ArcGISPoint& point, ArcGISUTMConversionMode UTMConversionMode, bool addSpaces)

Returns a formatted coordinate in Universal Transverse Mercator (UTM) notation representing the given point's location.

Since 1.0.0

Arguments
NameTypeConstSummary
point
Yes

The coordinate to be represented in UTM notation.

UTMConversionMode
No

The latitude notation scheme to use in the returned UTM notation string, either a latitudinal band, or a hemisphere designator.

addSpaces
No

If false, the generated string contains no spaces. If true, a space separates the UTM zone and latitude designator, and each numerical easting and northing value.

Returns FString

A UTM notation string representing the position of the given point.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.