Skip to content

Instantly share code, notes, and snippets.

@jeteon
jeteon / dms2dec.py
Last active June 4, 2021 17:43 — forked from tomwhipple/dms2dec.py
Convert coordinates in DMS notation to decimal in Python.
#!/env/python
# coding=utf8
"""
Converting Degrees, Minutes, Seconds formatted coordinate strings to decimal.
Formula:
DEC = (DEG + (MIN * 1/60) + (SEC * 1/60 * 1/60))
Assumes S/W are negative.