Extract geo_distance() sort function