Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nearest zip code of a zip code?

I need to find the 5 nearest zip code of a zip code. For example, I have 33304, and I need to find the nearest ones, like 33309, 33308 ...

Is there a database or a web service somewhere that would help me with that?

I think I'm gonna have to build my own database in order to do that? I know how to do it, but in case it has already been done ...

like image 997
davitz38 Avatar asked Sep 13 '10 22:09

davitz38


People also ask

Where is 00001 ZIP Code?

The lowest and highest of these postal codes are both specific to areas in Alaska; The 00001 code is for the N Dillingham area, and the postal code 99950 is for Ketchikan, AK.

What are the 3 digits after a ZIP Code?

The first three digits usually designate a sectional center facility (a mail sorting and distribution center for an area). From there, the last two digits determine where the mail should be delivered.

What is the US 5 digit ZIP Code?

A ZIP Code is a 5-digit number that specifies an individual destination post office or mail delivery area. ZIP codes determine the destination of letters for final sorting and delivery. Each ZIP Code designates a collection of delivery routes used by mail carriers and areas serviced by the USPS.


2 Answers

what country? Maybe you want to checkout Geonames: http://www.geonames.org/

Especially: http://www.geonames.org/export/web-services.html#findNearbyPostalCodes

like image 188
sled Avatar answered Sep 20 '22 13:09

sled


This answer is in response to the recent bounty requesting a location of US Zip Codes.

The United States Census Bureau has a list of zip codes (with latitude and longitude) on their web site.

The zip code tabulation areas is a CSV that contains (as described in the description of the file format), among other fields:

Column 1    GEOID   Five digit ZIP Code Tabulation Area Census Code
...
Column 6    INTPTLAT    Latitude (decimal degrees) First character is blank or "-" denoting North or South latitude respectively
Column 7    INTPTLONG   Longitude (decimal degrees) First character is blank or "-" denoting East or West longitude respectively

I'd cross reference the above, with data from the Census Bureau's county business patterns CSV to get city, state and county names. This file format is described to contain (among other fields) (description is in the file you select to download):

ZIP             C       ZIP Code
NAME            C       ZIP Code Name
...
CITY            C       ZIP City Name
STABBR          C       ZIP State Abbreviation
CTY_NAME        C       ZIP County Name
like image 39
Andy Avatar answered Sep 17 '22 13:09

Andy