Created
April 22, 2011 23:52
-
-
Save mpalmer/937966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String lat = "12345.67"; | |
int decpoint = lat.indexOf("."); | |
String min = lat.substring(decpoint - 2); | |
String deg = lat.substring(0, decpoint - 3); | |
Double latitude = Double.valueOf(deg) + Double.valueOf(min) / 60; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment