Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Distance to nearest store

by nop (Hermit)
on Jan 03, 2001 at 23:36 UTC ( #49595=perlquestion: print w/replies, xml ) Need Help??
nop has asked for the wisdom of the Perl Monks concerning the following question:

Hi. I want to find, for each US 5 digit zipcode, the distance to the nearest store run by one of our competitors. I can determine a list of competitor zips by using the store locator on their site. I also need a good source for the latitude and longitude of (the centroid, I guess) each zipcode, as well as a function to get the distance (great circle, I guess) between two points specified in latitude and longitude, as well as reasonable approach to find the closest zip to each zip (as there are 30 or 40K valid zipcodes).

This doesn't need to run in real time -- it is not a web app -- but I do need to refresh the whole process every few months.

Any suggestions from the Monks? Any useful CPAN modules I should be considering? Any good sources of zipcode data in the public domain?

Replies are listed 'Best First'.
Re: Distance to nearest store
by lhoward (Vicar) on Jan 03, 2001 at 23:56 UTC
(Ovid) Re: Distance to nearest store
by Ovid (Cardinal) on Jan 03, 2001 at 23:47 UTC
    You may find this link useful. It has links to public domain zip code data and even a module that has some of the functionality that you are searching for.


    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Re: Distance to nearest store
by lemming (Priest) on Jan 03, 2001 at 23:41 UTC
    jcwren does a nice job with his monk map locator. Check out his page. Though I don't think he uses the great circle technique.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://49595]
Approved by root
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2018-07-17 15:58 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (372 votes). Check out past polls.