Does anyone have a script to batch process changing Deg. Min. Sec. of lat/long into Deciamal degrees….?? I.e. will be 123°46’56” to 123.78222222°. I have about 60 to 70 rows in multiple file.

1036
4
04-21-2017 12:22 PM
Labels (1)
AlexWoldemichael
New Contributor

Does anyone have a script to batch process changing Deg. Min. Sec. of lat/long into Decimal degrees….??

For Example I have 123°46’56” to 123.78222222°. I have about 60 to 70 rows in multiple files. The content of the file looks like this...... 

61 12 44.4N 109 58 34.9W
62 18 02.1N 108 58 58.5W
63 10 48.9N 108 09 10.8W
64 13 07.0N 107 01 47.5W
64 37 51.2N 106 23 07.2W
64 46 07.3N 106 10 24.7W
64 00 17.5N 105 47 54.9W
64 05 05.0N 105 40 14.9W
65 17 50.5N 105 22 36.3W
65 35 10.7N 104 58 21.5W
65 44 58.9N 104 44 30.4W
65 57 28.9N 104 23 58.0W
65 19 09.4N 103 47 48.5W
65 27 02.8N 103 34 50.2W
65 38 48.0N 103 18 50.9W
65 06 27.6N 102 41 18.8W
66 13 55.7N 102 11 37.1W
66 31 26.8N 100 59 22.3W
66 39 52.2N 100 33 28.5W

0 Kudos
4 Replies
ChrisSmith7
Frequent Contributor

Are you doing this in ArcGIS, in SQL, in a flat txt/CSV, or an Excel file?

AlexWoldemichael
New Contributor

I'm planning to prepare all file which are in excel to txt (cvs) file and bring them to ArcMap to draw the line.

Tried importing excel file directly to ArcMap and when I did   to Display XY Data I don't see the X and Y field, even thought I see all the data in the table.

0 Kudos
ChrisSmith7
Frequent Contributor

Well, you can import a table into ArcGIS to work with the technology without needing to create an x/y layer. If you decide to do that, check out Converting degrees-minutes-seconds values to decimal Ddegree values—Help | ArcGIS for Desktop 

If you want to do it in Excel, check out Degrees-Minutes-Second (DMS) to Decimal-Degrees (DD) with Excel | Geospatiality 

AlexWoldemichael
New Contributor

Thanks Chris. I will give a shoot on Monday and let you know how it pan out.

Thanks for you help again

0 Kudos