Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What you are asking for is a service to provide "Free Zip code Geocoding". There are a few out there with varying quality. You're going to have a bad time coding something like this yourself because of a few reasons:</p> <ol> <li>Zip codes can be assigned to a single building or to a post office. </li> <li>Zip codes are <strong>NOT</strong> considered a polygonal area. Projecting Zip codes to a polygonal area will require you to make an educated guess where the boundary is between one zipcode and the next.</li> <li>ZIP code address data specifies only a center location for the ZIP code. Zip code data provides the general vicinity of an address. Mailing addresses that exist between one zipcode and another can be in dispute on which zipcode it actually is in. </li> <li>A mailing address may be physically closer to zipcode 11111, yet its official zip code is a more distant zip code point 11112.</li> </ol> <p><strong>Google Maps has a geocoding API:</strong></p> <p>The google maps API is client-side javascript. You can directly query the geocoding system from php using an http request. However, google maps only gives you what the United States Postal Service gives them. A point representing the center of the zipcode.</p> <p><a href="https://developers.google.com/maps/#Geocoding_Examples" rel="nofollow noreferrer">https://developers.google.com/maps/#Geocoding_Examples</a></p> <p><a href="https://stackoverflow.com/questions/10525132/map-city-zipcode-polygons-using-google-maps">map city/zipcode polygons using google maps</a></p> <p><strong>Thoughts on projecting a zipcode to its lat/long bounding box</strong></p> <p>There are approximately 43,000 ZIP Codes in the United States. This number fluctuates from month to month, depending on the number of changes made. The zipcodes used by the USPS are not represented as polygons and do not have hard and fast boundaries. </p> <p>The USPS (United States Postal Service) is the authority that defines each zipcode lat/long. Any software which resolves a zipcode to a geographical location would be in need of weekly updates. One company called alignstar provides demographics and GIS data of zipcodes ( <a href="http://www.alignstar.com/data.html" rel="nofollow noreferrer">http://www.alignstar.com/data.html</a> ).</p> <p><strong>Given a physical (mailing) address, find the geographical coordinates in order to display that location on a map.</strong></p> <p>If you want to reliably project what shape the zipcode is in, you are going to need to brute force it and ask: "give me every street address by zipcode", then paint boxes around those mis-shapen blobs. Then you can get a general feel for what geographical areas the zipcodes cover.</p> <p><a href="http://vterrain.org/Culture/geocoding.html" rel="nofollow noreferrer">http://vterrain.org/Culture/geocoding.html</a></p> <p>If you were to throw millions of mailing address points into an algorithm resolving every one to a lat/long, you might be able to build a rudimentary blob bounding box of that zipcode. You would have to re-run this algorithm and it would theoretically heal itself whenever the zipcode numbers move. </p> <p><strong>Other ideas</strong></p> <p><a href="http://shop.delorme.com/OA_HTML/DELibeCCtpSctDspRte.jsp?section=10075" rel="nofollow noreferrer">http://shop.delorme.com/OA_HTML/DELibeCCtpSctDspRte.jsp?section=10075</a></p> <p><a href="http://www.zip-codes.com/zip-code-map-boundary-data.asp" rel="nofollow noreferrer">http://www.zip-codes.com/zip-code-map-boundary-data.asp</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload