5

Is there any API out there which can give me Polygon value for a zipcode? I really thought that it would be fairly easy for me given the number of Maps APIs out there. Either Google Maps API or something else would be able to give me that data. But a plain Google search was not able to come back with any results which were satisfying.

The I realized that the Zipcodes can not be "strictly" defined as polygons. They belong to another type of geometrical element called "Boundaries".

All I want it a container inside a container inside a container

However, the smallest molecule in the equation would be a zipcode. The other containers can be Polygons OR Boundaries. I am not sure if that would make a HUGE difference. However, what I want essentially is a Geometrical representation of a zipcode boundary so that my SQL Server Db can understand it and I can query it from there

Any good suggestions on how can I enter a Zipcode and get a respective Polygon/boundary value for it?

geocodezip
  • 316
  • 1
  • 4
  • 9
Lost
  • 163
  • 1
  • 1
  • 5
  • something else like http://boundaries.latimes.com/set/zip-code-tabulation-areas-2012/ using openlayers – Mapperz Feb 07 '15 at 01:10
  • Sounds like they have only LA County data. Isn't it? – Lost Feb 07 '15 at 01:13
  • All are available http://www.census.gov/geo/maps-data/data/cbf/cbf_zcta.html for GIS not webservices – Mapperz Feb 07 '15 at 01:32
  • Can you say what scope you're interested in? In some countries, that data isn't publicly available. – BradHards Feb 07 '15 at 02:22
  • This Wayback Machine link covers Census' linkrot now present in @Mapperz comment: http://web.archive.org/web/20150315041215/http://www.census.gov/geo/maps-data/data/cbf/cbf_zcta.html – albert Jun 30 '19 at 16:41

2 Answers2

4

**Disclaimer I work here*

Very simple solution to this. sign up here: boundaries-io.com

then in your code: .../rest/v1/public/boundary?zipcode=20037,20002

The results are GeoJson to easily integrate that takes GeoJson like Google Map... used GeoJSONLint to cut and paste my GeoJson Results from the API call above to display the below image...Hope this helps!

Zip Code(s) to Polygons Example GeoJSON Screenshot Using Boundaries-io.com's API.

albert
  • 171
  • 2
  • 10
Jeryl Cook
  • 355
  • 4
  • 22
2

First of all, clarification is in order for ZIP codes. They are NOT boundaries or polygons. ZIP codes are service routes that are correctly represented as points or as sides of a street in a GIS context.

If you are interested in using Mappperz links, I would supplement his recommendations with a page that talks about what ZCTAs are and how they are created (Link). As of May 17, 2015, this is the ZCTA national shapefile data for all ZCTAs that has demographic data readily available.

Kotebiya
  • 970
  • 5
  • 19
  • I ran into a similar situation a few years ago where I assumed zip code boundaries were the solution to my problem--little did I know that they aren't actual boundaries until I got too deep. You may have buildings or pockets within your boundary that are one zip code by themselves. Or multiple buildings within different zipcodes that are the same (campus buildings for a school, for example) these outliers caused me way more cleanup and re-calculation than it was worth. Census Traffic Zones may be something to consider. – MaryBeth Nov 16 '15 at 13:28
  • 1
    Zip codes can be translated into rough polygons and can be represented in GeoJSON. You can have "holes" represented in GeoJSON (to address one off buildings or areas that are not included in a Zip Code, if these are really necessary). As an example here is a GeoJSON of all the zip codes in Denver: https://raw.githubusercontent.com/codeforamerica/click_that_hood/master/public/data/denver.geojson – SSH This Mar 28 '17 at 17:22