There may be other/faster means of doing this, but com.bbn.openmap.geo.Geo has distanceKM and distanceNM methods which take in two lat-lon pairs and returns the distance in KM or NM units, respectively.
-----Original Message-----
From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-users_at_bbn.com]On
Behalf Of Ben Podoll
Sent: Wednesday, August 11, 2004 6:46 PM
To: openmap-users_at_bbn.com
Subject: [OpenMap Users] sort lat,lon pairs (or find distance)
I have a list of LatLonPoint objects, and I want to sort them by distance
from a LatLonPoint. Hence I want to make a method that could do this:
public List sortLatLons(List latlonlist, LatLonPoint llp){
//where the latlonlist is a List of LatLonPoint objects
//sort the latlonlist in order closest to the llp
//return the list
}
What can I use in OpenMap to accomplish this goal?
Thanks,
Ben
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Aug 11 2004 - 19:18:30 EDT