Description:
This Python program converts coordinates from Degrees Minutes Seconds to Decimal Degrees and vice versa. A demo of the script running in the console can be viewed here, as well as the source code afterwards.
Demo:
Welcome to Cory's Latitude/Longitude Conversion Program!
Please Select a conversion from the options below:
Conversion 1: Decimal Degrees to Degrees/Minutes/Seconds
Conversion 2: Degrees/Minutes/Seconds to Decimal Degrees
Conversion (1 or 2):1
***Decimal Degrees >>> Degrees/Minutes/Seconds***
Input Latitude: 38.434164
Input Longitude: -78.863115
Results:
Latitude: 38 Degrees, 26 Minutes, 2.99040000001 Seconds NORTH
Longitude: 78 Degrees, 51 Minutes, 47.214 Seconds WEST
Start Over? Yes(1) or No, End Program(2): 1
**Starting Over**
Please Select a conversion from the options below:
Conversion 1: Decimal Degrees to Degrees/Minutes/Seconds
Conversion 2: Degrees/Minutes/Seconds to Decimal Degrees
Conversion (1 or 2):2
***Degrees/Minutes/Seconds >>> Decimal Degrees***
Input Latitude
Degrees: 38
Minutes: 54
Seconds: 18.5
North (1) or South (2): 1
Input Longitude
Degrees: 77
Minutes: 2
Seconds: 15.1
East (1) or West (2): 2
Results:
Latitude: 38.9051388889
Longitude: -77.0375277778
Start Over? Yes(1) or No, End Program(2): 2
Thanks for using Cory's Latitude/Longitude Conversion Program! Goodbye.
Source Code: