Sort list of lon\\lat points, start with nearest
I have location from GPS (lon_base, lat_base). I have a list of locations (lon1, lat1|lon2, lat2|lon3, lat3...) This list is very long and is around the world. My questions are: 1. How do I get from that list only the lon\lat that are 1 mile from my lon_base\lat_base? 2. How do I sort them from closest to farthest? Thanks in advance! You want to define your own Comparator that, in general, looks something like this: LonLat myHouse = /* whatever */ ; Comparable comp = new Comparable () { LonLat a; int compareTo (Object b) { int aDist = calcDistance(a, myHouse) ; int bDist = calcDistance(b,