Finding nearest location, calculating distance - best way to store and sort info?

"Matt Kime" <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
I have a database of addresses and i'm trying to find the nearest
locations. Rather than computing the distance for all the addresses in
the database, I'm starting by creating an array of addresses within x
distance. Now that I have my array, I'm finding myself at my limit of
java knowledge. I'd like to create an associative array that i can
sort with, storing objects and sorting on their distance. What is the
best java tool for this? The different types of maps are confusing me
and I'm not sure if they'll work for what i want anyway. (it seems
that a sortedMap won't work if I want to store an object - no way to
compare my address objects)

what solutions have you employed?

thanks,
matt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.