Convert lat and long to correct format