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.
Solved! Go to Solution.
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
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.
Thank you, Kyle. Like you, I had never seen this variant of DMS before! Yes, this works.