You are on page 1of 2

Converting degrees-minutes-seconds values

to decimal degree values


The following is the simple equation to convert degrees, minutes, and seconds into decimal
degrees:

DD = (Seconds/3600) + (Minutes/60) + Degrees

The conversion must be handled differently if the degrees value is negative. Here's one way:

DD = - (Seconds/3600) - (Minutes/60) + Degrees

In the instructions below, you will convert one field in a table of latitude or longitude values in
degrees, minutes, and seconds to decimal degrees using the Field Calculator. The code is in
VBScript but is easily converted to other programming languages. It is assumed that the degrees,
minutes, and seconds are stored as a string (text), with spaces between the numbers and no
symbols. For example, the data would be stored as:

25 35 22.3

where 25 is degrees, 35 is minutes, and 22.3 is seconds.

The output will be stored in a number field.

1. Add the table to ArcMap.


2. Right-click the table in the table of contents and click Open.
3. Click the Options button and click Add Field.
4. Type Lat2 in the Name field.
5. Click the Type drop-down arrow and click Double from the list.

If Lat2 is already used as a field name, choose a name that is not used.

6. Click OK.
7. Right-click the Lat2 field and click Field Calculator.
8. Click Yes if presented with a message box.
9. Check the Advanced check box.
10. Paste the following code into the expression box:
11. Dim Degrees
12. Dim Minutes
13. Dim Seconds
14. Dim DMS
15. Dim DD
16.
17. DMS = Split([Latitude])
18. Degrees = CDbl(DMS(0))
19. Minutes = CDbl(DMS(1))
20. Seconds = CDbl(DMS(2))
21. If Degrees < 0 Then
22. DD = -(Seconds/3600) - (Minutes/60) + Degrees
23. Else
24. DD = (Seconds/3600) + (Minutes/60) + Degrees
25. End If

In the sixth line, beginning with DMS =, the text within the brackets [ ] should be the
name of the field holding the latitude values. Replace the word Latitude in the code with
the name of the field (in your table) that stores the DMS latitude values.

26. Paste the following code into the Lat2 = box at the bottom of the dialog box:
27. CDbl(DD)
28. Click OK.
29. Repeat steps 3 through 12 for the longitude values.

You might also like