problem in loading excel having values in degree minute second

3362
10
Jump to solution
03-06-2016 11:30 PM
sakshimittal
New Contributor III

Hi.. I have an excel in which the values are in degree minute second format. I want to convert all this in decimal degrees by a single tool but the tool display xy data is not highlighting even i can't add a new field in the excel to calculate it again. please tell me what should i do?

0 Kudos
1 Solution

Accepted Solutions
JayantaPoddar
MVP Esteemed Contributor

I have used an equation in excel to convert DMS to DD. Since the Longitude value is from West, I have introduced the negative sign.

The cursor position of a few values were modified, to extract the correct value.

Please find attachment below.



Think Location

View solution in original post

10 Replies
JayantaPoddar
MVP Esteemed Contributor

Hi Sakshi,

Could you attach a sample excel sheet of the existing data available with you?



Think Location
0 Kudos
sakshimittal
New Contributor III

Thanks Jayanta.. PFA excel sheet.

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

I have used an equation in excel to convert DMS to DD. Since the Longitude value is from West, I have introduced the negative sign.

The cursor position of a few values were modified, to extract the correct value.

Please find attachment below.



Think Location
NeilAyres
MVP Alum

Those dms text strings look well formatted so the convert coordinate notation tool would work on this data.

sakshimittal
New Contributor III

I have tried this tool but the output creating blank shape file with two blank columns of lat long.

0 Kudos
NeilAyres
MVP Alum

The output from the tool is a feature, not just a table, with the desired coordinates, in whatever format added to the attribute table.

Did you choose the correct input options?

DMS Long / Lat in 2 separate columns?

sakshimittal
New Contributor III

Thanks a lot .. can you please tell me about that equation??

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

OK

Let me consider the DMS value has 02 digits each with the symbol of Deg. Min. and Sec. in between (e.g. 23d45m30sN).

The expression I have used is LAT_dd = VALUE(LEFT(<LAT_DMS>,<No. of characters> ) + MID(<LAT_DMS>,<Cursor Position>,<No. of characters>)/60 +MID (<LAT_DMS>,<Cursor Position>,<No. of characters>)/3600)

LEFT (23d45m30sN, 2) = 23

MID (23d45m30sN, 4, 2) = 45    ----> converted to deg. 45/60

MID(23d45m30sN, 7, 2) = 30     ----> Converted to deg. 30/3600

So the value would be 23+45/60+30/3600 = 23.758333

Ultimately, the VALUE function converts the result of the above expression into numeric.

NOTE: Few values had a different format. I had to change the cursor position/No. of Characters for these values



Think Location
DanPatterson_Retired
MVP Emeritus

I suspect that your data are not in numeric format.  In order for it to be converted, your degrees, minutes and seconds would need to be in separate columns.  If they are in one column, then the data need to be parsed in excel and decimal degrees calculated from it