MilitaryGridReferenceSystemTryParse(String, Double, Double, 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,
double radius,
double flattening,
out MilitaryGridReferenceSystem mgrs
)
- value String
- string
- radius Double
- Equatorial Radius (Semi-Major Axis)
- flattening Double
- Inverse Flattening
- mgrs MilitaryGridReferenceSystem
- MilitaryGridReferenceSystem
BooleanMilitaryGridReferenceSystem
The following example attempts to parse an MGRS coordinate set with GRS80 system ellipsoid values.
MilitaryGridReferenceSystem mgrs;
if(!MilitaryGridReferenceSystem.TryParse("16U EA 00872 05009", 6378137.0, 298.257222101, out mgrs))
{
Console.WriteLine(mgrs);//16U EA 00872 05009
}