So i was given a excel. xls table with Lat and Long of decimal degrees minutes and i need to import it into ArcMap. I am needing to convert them to decimal degrees in order to import it into ArcMap. How can i convert this table the entire table to decimal degrees. I tried using the Add XY Data but when i select the file nothing happens, do i also need to convert the table certain format before add it to arcmap? Can this be done through arcmap or field calculator? I would appreciate any help.
The table is populated as following
Long | Lat |
---|---|
-116 37.863 | 43 41.353 |
Solved! Go to Solution.
It is popular question here, use Convert Coordinate Notation—Help | ArcGIS Desktop
are the entries really formatted with a space separating the degree portion from the decimal minutes?
Yes there is a space.
It is popular question here, use Convert Coordinate Notation—Help | ArcGIS Desktop
Aww sweet tool it took the table and converted it correctly, it worked with space separating the degree!
FID | Shape | Long | Lat | DDLat | DDLon |
---|---|---|---|---|---|
0 | Point | -116 37.863 | 43 41.353 | 43.68922 | -116.63105 |
Yes, or just in the field calculator for future reference
def ddm_ddd(a, sep=" "):
""" convert decimal minute string to decimal degrees
: a - degree, decimal minute string
: sep - usually a space, but check
"""
import math # if not already imported or available
d, m = [abs(float(i)) for i in a.split(sep)]
sign = [-1, 1][d < 0]
dd = sign*(d + m/60.)
return dd
# useage in field calculator, python parser to calculate into a double field
# for the expression box...
# ddm_ddd(!YourField!, sep=" ")
Dan, Thanks for the field calculator formula.