Method FromGars
FromGars(String, SpatialReference, GarsConversionMode)
Parses a coordinate string in the Global Area Reference System (GARS) notation, and returns a MapPoint representing that location.
Declaration
public static MapPoint FromGars(string coordinates, SpatialReference spatialReference, GarsConversionMode garsConversionMode)
Parameters
Type | Name | Description |
---|---|---|
System.String | coordinates | The GARS notation string for the coordinate. |
SpatialReference | spatialReference | An optional SpatialReference that defines the datum and ellipsoid referenced by the GARS coordinate.
May be |
GarsConversionMode | garsConversionMode | Select whether the returned point's location represents the south-west corner of the GARS cell the coordinate lies within, or its center. |
Returns
Type | Description |
---|---|
MapPoint | A MapPoint with the location from the GARS string in the spatial reference provided. |
Remarks
The provided spatialReference
parameter must have an ellipsoid and datum matching those
used by the source of the GARS string. If no SpatialReference is provided, it is assumed that
the GARS string is referenced to Wgs84. The GARS string must not contain any whitespace.
GARS notation examples |
---|
354ND |
354ND22 |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
ArcGISRuntimeException | Given coordinates could not be parsed or converted. |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.1 - 200.6 |
Xamarin.Android | 100.1 - 100.15 |
Xamarin.iOS | 100.1 - 100.15 |
UWP | 100.1 - 200.6 |