Skip to content

Instantly share code, notes, and snippets.

@jonobr1
Created January 29, 2011 02:28
Show Gist options
  • Save jonobr1/801443 to your computer and use it in GitHub Desktop.
Save jonobr1/801443 to your computer and use it in GitHub Desktop.
Line-to-Variables
String thisLine = reader.readLine();
if(thisLine != null) {
String[] explode = split(thisLine, '=');
if (explode != null) {
long epoch = explode[0].trim() / 1000;
Date time = new Date(epoch);
float lat = -1;
float lon = -1;
String[] latLong = split(explode[1].trim(), ',');
lat = parseFloat(latLong[0]);
lon = parseFloat(latLong[1]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment