MilitaryGridReferenceSystemTryParse(String, Earth_Ellipsoid_Spec, MilitaryGridReferenceSystem) Method
Attempts to parse a string into an MGRS coordinate.
Namespace: CoordinateSharpAssembly: CoordinateSharp (in CoordinateSharp.dll) Version: 3.1.1.1
XMLNS for XAML: Not mapped to an xmlns.
public static bool TryParse(
string value,
Earth_Ellipsoid_Spec spec,
out MilitaryGridReferenceSystem mgrs
)
- value String
- string
- spec Earth_Ellipsoid_Spec
- Earth_Ellipsoid_Spec
- mgrs MilitaryGridReferenceSystem
- MilitaryGridReferenceSystem
BooleanMilitaryGridReferenceSystem
The following example attempts to parse an MGRS coordinate set with a GRS80 system ellipsoid.
MilitaryGridReferenceSystem mgrs;
if(!MilitaryGridReferenceSystem.TryParse("16U EA 00872 05009", Earth_Ellipsoid_Spec.GRS80_1979, out mgrs))
{
Console.WriteLine(mgrs);//16U EA 00872 05009
}