Show / Hide Table of Contents

Method FromGeoRef

FromGeoRef(string, SpatialReference?)

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

Declaration
public static MapPoint FromGeoRef(string coordinates, SpatialReference? spatialReference)
Parameters
Type Name Description
string coordinates

The GEOREF notation string for the coordinate.

SpatialReference spatialReference

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

Returns
Type Description
MapPoint

A MapPoint with the location from the GEOREF 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 GEOREF string. If no SpatialReference is provided, it is assumed that the GEOREF string is referenced to Wgs84. The GEOREF string may contain leading and trailing whitespace.

GEOREF notation examples
MKML5056
MKML50285665
Exceptions
Type Condition
ArgumentException

coordinates is null.

ArcGISRuntimeException

Given coordinates could not be parsed or converted.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.0 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.1 - 200.8
Xamarin.Android100.1 - 100.15
Xamarin.iOS100.1 - 100.15
UWP100.1 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.