Date: Thu, 20 Aug 2009 09:53:35 -0400
Reply-To: Suresh Ramanathan <ramanathansuresh@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Suresh Ramanathan <ramanathansuresh@YAHOO.COM>
Subject: shortest distance algorithm
Hello SAS Users,
I am looking for an efficient way to find the closest dealer location for
every customer in our db.
We have a customer table (37 mil unique customers) and a dealer table
(5000 unique dealers).
Customer table has the latitude & the longitude of the customer location
in decimal degrees and the
Dealer table has the latitude & the longitude of the dealer location in
decimal degrees
I was able to get the formula for calculating the distance between two
points based on lat & long from wiki.
Is there a way other than using the brute force to get the shortest
dealer location for every customer.
Please share your thoughts.
Thanks
Suresh
|