Coordinate conversion

907
6
Jump to solution
04-18-2017 02:36 PM
CCWeedcontrol
Occasional Contributor III

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

LongLat
-116 37.86343 41.353
0 Kudos
1 Solution

Accepted Solutions
AbdullahAnter
Occasional Contributor III
6 Replies
DanPatterson_Retired
MVP Emeritus

are the entries really formatted with a space separating the degree portion from the decimal minutes?

CCWeedcontrol
Occasional Contributor III

Yes there is a space.

0 Kudos
AbdullahAnter
Occasional Contributor III

It is popular question here, use Convert Coordinate Notation—Help | ArcGIS Desktop  

CCWeedcontrol
Occasional Contributor III

Aww sweet tool it took the table and converted it correctly, it worked with space separating the degree!

FIDShapeLongLatDDLatDDLon
0Point-116 37.86343 41.35343.68922-116.63105
0 Kudos
DanPatterson_Retired
MVP Emeritus

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=" ")
CCWeedcontrol
Occasional Contributor III

Dan, Thanks for the field calculator formula.