Artifact [d869830d5e]

Artifact d869830d5e73670f550392ccdfe36ca5703dedf8:

Wiki page [ZIP2Coords] by densch 2015-04-17 17:52:55.
D 2015-04-17T17:52:55.124
L ZIP2Coords
U densch
W 624
This is a webservice that allows us to map US ZIP codes to a pair of coordinates. 

Usage is very simple, just query the service with a ZIP code as a parameter:
<tt>http://localhost/zip2coords/?zip=90210</tt>

And receive the coordinates in JSON format:
<pre>
{"latitude":"34.0901000","longitude":"-118.4065000"}
</pre>
Data comes from 
<a href="http://download.geonames.org/export/zip/">GeoNames ZIP codes</a>. To build the MySQL database run the <tt>database/geonames.sh</tt> shell script. It'll download the required data, setup the database and load the data into it.

Requires PHP with PDO and JSON support.
Z 55a58ed916b4e825f7a41719b0fafd6f