Convertion form DMS to DD help

746
3
Jump to solution
06-27-2018 09:06 AM
JosephCarter
Occasional Contributor

I was given a table in DMS format (Attached). I have tried to convert to a stable DD format for landing in a map, many different ways, with no luck. Any ideas? The conversion tool failed in Data Management/Projections . . /Convert Coordinate Notation. I know the spaces and two zeros after the seconds are causing the tool to fail and can't  seem to get a solution. The Long should be negative and that is also an issue with the format I received. Thanks in advance for any ideas/code that may work.

0 Kudos
1 Solution

Accepted Solutions

Howdy neighbor.

There are so many variations of DMS, I have not seen this one before where the decimal seconds are space delimited rather than just using a decimal.  Anyhow, in the case of your example, something like this should work in the field calculator:

float(!LAT![0:2])+float(!LAT![3:5])/60+float(!LAT![6:7])/3600+float(!LAT![9:10])/100000

View solution in original post

3 Replies

Howdy neighbor.

There are so many variations of DMS, I have not seen this one before where the decimal seconds are space delimited rather than just using a decimal.  Anyhow, in the case of your example, something like this should work in the field calculator:

float(!LAT![0:2])+float(!LAT![3:5])/60+float(!LAT![6:7])/3600+float(!LAT![9:10])/100000

Here's the longitude:

0-(float(!LONG![0:2])+float(!LONG![3:5])/60+float(!LONG![6:7])/3600+float(!LONG![9:10])/100000)

I'm not sure I got the 9:10 character order of magnitude correct, but this should be close.

JosephCarter
Occasional Contributor

Thank you, Kyle. Like you, I had never seen this variant of DMS before! Yes, this works.

0 Kudos