function to format geo data