NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

My Project Requirement:

I have a project requirement where I need to create a database for the country of the United States of America containing the following columns: Zip code

Latitude(of zip code)

Longitude(of zip code)

Zip code 1 ( which is at a distance of 10 miles from zip code)

Zip code 2 (which is at a distance of 25 miles from zip code)

Zip code 3 (which is at a distance of 50 miles from zip code)

My approach:

1.Download the OSM file (in PBF format ) for the country of united states of America 2.Convert the PBF file into a format which contains the zip code, latitude, and longitude information of USA 3.Extract the information into the database

My Research : I tried using the site to convert pbf file into excel file.However, it had size limitations and I could not use it for free. I also searched the internet for various other formats in which the PBF file could be converted. I haven't got any such file format.

My Question: I have downloaded the OSM(PBF) files for the entire country of the United States of America from

Do these files contain the following information :

All zip codes in the USA



In which format can I convert the PBF file so that I can get the above information? Can I get a converter for free which allows the conversion so that I can extract all the relevant information for my database?

Any help will be appreciated

asked 28 Jan '19, 12:23

sabyasachi_gupta's gravatar image

accept rate: 0%

edited 28 Jan '19, 20:07

aseerel4c26's gravatar image

aseerel4c26 ♦

Cross-posted here

(28 Jan '19, 17:11) alester

OpenStreetMap is unsuitable for your project because:

  1. It does not have complete coverage of US ZIP codes, only patchy coverage
  2. Where OSM has ZIP codes they will either be attached to individual addresses, hence you will find more than one occurrence of a ZIP code in the data, or they will be mapped as polygons, which would mean you'd have to construct these polygons first and compute their centroid

Also, you seem to assume that ZIP codes are tied to one particular lat/lon pair when in reality they cover a larger area, hence it is unclear what you mean by the distance between two zip codes.

I suggest you use a web search engine to search "US zipcodes download" and you'll find a few providers giving you simple tables with zip code and lat/lon of the central point, which will make life much easier for you.

permanent link

answered 28 Jan '19, 13:38

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 28 Jan '19, 12:23

question was seen: 4,128 times

last updated: 28 Jan '19, 20:07

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum