zip code and distances

D

David Lozzi

Hey All,

I need to add a locator service for asp.net where a user would specify a zip code and then the returned list would be displayed in order of closest to furthest. I realize this is a third pary app, but who/what do you recommend??

Thanks!
 
K

Kevin Spencer

Third party app? Not necessarily. After all, YOU'RE a third party as well!

What you need is a database of post office locations that includes lat/long
information on each post office. Each Post Office is a zip code. Then you
need a database of whatever you're trying to locate, which also includes
lat/long information about the locations (zip code not necessary). Then you
create a query that uses a bit of trigonometry to get the distance from the
zip code to each of the locations in your locations table, by calculating
the distance between the lat/long of the post office to the lat/longs of
each location. This part can be little tricky, as calculating distances
between lat/longs means calculating distances on the surface of an
ellipsoid, not a sphere, but depending on how accurate you need the results
to be, you can approximate a sphere using the Mean Earth radius.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

Hey All,

I need to add a locator service for asp.net where a user would specify a zip
code and then the returned list would be displayed in order of closest to
furthest. I realize this is a third pary app, but who/what do you
recommend??

Thanks!
 
S

sean_atlas

I just got done implementing locator using zipfind from
http://www.zipfind.net/

It came with sample code and was easy to install and implement. One
drawback is that it is
expensive, like over $1000, but you get licenses for 5 domains with
that, so you can re-use it
if you host multiple domains for different applications.

Also, it has one built-in "easter egg" we found that you will need to
code-around. It will tell you
if a zip code is valid or not, but for some reason it returns 99999 as
being a valid zip code, even
though it is not, and the city/region associated with that zip code in
their database is the name
of the original company that wrote the zip code software. So, in your
form where you check the
zip code that the user entered to see if it is valid, you also need to
check for 99999.

Anyhow, we are really happy with it.

Hey All,

I need to add a locator service for asp.net where a user would
specify a zip code and then the returned list would be displayed in
order of closest to furthest. I realize this is a third pary app, but
who/what do you recommend??
 
L

Lynda Postal

sean_atlas said:
I just got done implementing locator using zipfind from
http://www.zipfind.net/

It came with sample code and was easy to install and implement. One
drawback is that it is
expensive, like over $1000, but you get licenses for 5 domains with
that, so you can re-use it
if you host multiple domains for different applications.

Also, it has one built-in "easter egg" we found that you will need to
code-around. It will tell you
if a zip code is valid or not, but for some reason it returns 99999 as
being a valid zip code, even
though it is not, and the city/region associated with that zip code in
their database is the name
of the original company that wrote the zip code software. So, in your
form where you check the
zip code that the user entered to see if it is valid, you also need to
check for 99999.

Anyhow, we are really happy with it.



specify a zip code and then the returned list would be displayed in
order of closest to furthest. I realize this is a third pary app, but
who/what do you recommend??
I have a routine for calculating distance between zip codes and a list
of zip codes with Lat/Lon data ... for free (that is what I paid for it)
interested??

:) L
 
G

Guest

I have a routine for calculating distance between zip codes and a list
of zip codes with Lat/Lon data ... for free (that is what I paid for it)
interested??

:) L

I'd be interested in it!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top