Converts the given coordinate string to decimal degrees.
the resulting decimal degrees
The coordinates may be given either as decimal degrees or as degrees, minutes, seconds, decimal part of seconds. Example: the left or right coordinate in decimal format 12.58243888889
corresponds to 12°34'56.78''E
in degrees, minutes and seconds. The negative left or right coordinate -12.58243888889
means 12°34'56.78''E
. Similar for top and bottom coordinates, where positive numbers mean North (N) and negative numbers South (S). Please consider using always dot for decimal points, rather than the locales dependend comma. Alternatively to to the character ° for degrees, ' for minutes and '' for seconds the small letters d, m and s may be used, thus you can get rid of encoding specific problems especially for the degrees, for which the character is differently encoded in different code pages. So the strings 12°34'56.78''E
and 12d34m56.78sE
mean exactly the same, the first one is more pretty, the later one more reliable.
Exception Type | Condition |
---|---|
ArgumentException | For not well formated input strings, also for commas instead of dots or for Weast/East for isNorthSouth true and vice versa. |
Utils Class | serial Namespace