I'm looking at ways to convert MGRS coordinates to Decimal Latitude, Longitude I've come across CoordinateSharp the Developer Guide makes use of tryParse but dosn't seem say how to trap the errors nor dose the dotnetfiddle example
I also note the output is Degree minute seconds not digital
The Developer Guide Suggests "c.FormatOptions.CoordinateFormatType = CoordinateFormatType.Degree_Decimal_Minutes;"
However it doesn't give any indication of what the error is In this case it's badly formatted MGRS, I've seen examples out of range where user has typed the wrong values correctly
ste5an
At a short glance at the parsers, they internally only use the TryParse pattern and don't bubble up any message where it failed. So in the current state, it seems, that you cannot get that information.
But as it is on GitHub, you can add this feature if you like.
trevor1940
ASKER
Thanx I find it quite odd not being able tell errors
Open in new window
However it doesn't give any indication of what the error is In this case it's badly formatted MGRS, I've seen examples out of range where user has typed the wrong values correctly