It would be more optimal to have a means of passing two different fields (lat and long) into a single comparator, but the implementation of the custom comparator appears to require a 1:1 comparator:field specification.