• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

Zip Codes of nearest large city

I have all the zip codes of the cities I want, but now I need to find the zip codes of the nearest large city.

Any ideas?
1 Solution
Giovanni HewardCommented:
Do you have additional data, such as population or metro area codes?
I think you'll need to update your zip code database to also include the latitude and longitude of each city's "center".

There are a few online resources where you can download this data for free (such as www.geonames.org) and there are also some paid services. (Even APIs).

Once you have your database updated with this new information, write some code to calculate distances.

Here's a nice website that demonstrates various ways of calculating the distance between two lat/long points on the Earth, along with some accompanying JavaScript code. Well done.

rrhandle8Author Commented:
ecarbone, this looks interesting.  Will dive into it tomorrow.  Thanks for the lead.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now