<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Zip Code Proximity Search</title>
	<link>http://ask.metafilter.com/52954/Zip-Code-Proximity-Search/</link>
	<description>Comments on Ask MetaFilter post Zip Code Proximity Search</description>
	<pubDate>Tue, 12 Dec 2006 06:52:45 -0800</pubDate>
	<lastBuildDate>Tue, 12 Dec 2006 06:52:45 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Zip Code Proximity Search</title>
		<link>http://ask.metafilter.com/52954/Zip-Code-Proximity-Search</link>	
		<description>I need to add a zip code proximity search to a site.  I have the registration form configured so that it stores a user&apos;s zip code with his/her profile.  Now I want to give the option to &quot;Show all users within X miles&quot;.  Does anyone know if there is a web API to handle this? &lt;br /&gt;&lt;br /&gt; If nobody knows of a web API, does anyone have a better solution?</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2006:site.52954</guid>
		<pubDate>Tue, 12 Dec 2006 06:34:23 -0800</pubDate>
		<dc:creator>GatorDavid</dc:creator>
		
			<category>zipcode</category>
		
			<category>proximity</category>
		
			<category>search</category>
		
	</item> <item>
		<title>By: fvox13</title>
		<link>http://ask.metafilter.com/52954/Zip-Code-Proximity-Search#798520</link>	
		<description>Hmmm..... that sounds familiar. Maybe the fine folks who run MetaFilter would share their solution with you, maybe on MetaTalk?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.52954-798520</guid>
		<pubDate>Tue, 12 Dec 2006 06:52:45 -0800</pubDate>
		<dc:creator>fvox13</dc:creator>
	</item><item>
		<title>By: tmcw</title>
		<link>http://ask.metafilter.com/52954/Zip-Code-Proximity-Search#798526</link>	
		<description>If you want the do-it-yourselfer method, you can &lt;a href=&quot;http://www.darkshire.org/~jhkim/public_html/programming/zipcodes/&quot;&gt;download a ZIP code database&lt;/a&gt; (there are others for pay), and do the &lt;a href=&quot;http://www.darkshire.org/~jhkim/public_html/programming/zipcodes/math.html&quot;&gt;math in MySQL&lt;/a&gt;.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.52954-798526</guid>
		<pubDate>Tue, 12 Dec 2006 06:56:47 -0800</pubDate>
		<dc:creator>tmcw</dc:creator>
	</item><item>
		<title>By: zeoslap</title>
		<link>http://ask.metafilter.com/52954/Zip-Code-Proximity-Search#798531</link>	
		<description>All you need to do is get the &lt;a href=&quot;http://www.census.gov/geo/www/gazetteer/gazette.html&quot;&gt;lattitude and longitude of all zips &lt;/a&gt;in a table, then given your target zip you just select all zips +/- a bit of longitude/latitude.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.52954-798531</guid>
		<pubDate>Tue, 12 Dec 2006 06:59:05 -0800</pubDate>
		<dc:creator>zeoslap</dc:creator>
	</item><item>
		<title>By: maxwelton</title>
		<link>http://ask.metafilter.com/52954/Zip-Code-Proximity-Search#798535</link>	
		<description>Assuming USA users and five-digit zip codes, you can use a free database which yields the lat and long of each zip code, and then the ye olde great circle calculation to do so.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.thedigitalmapstore.com/Free_Stuff/ZIP_Code_Database/zip_code_database.html&quot;&gt;Database here&lt;/a&gt; (there are more out there, but this seems OK).&lt;br&gt;
&lt;br&gt;
Great circle formula:&lt;br&gt;
&lt;br&gt;
d = EarthRadius * 2 * arcsin(min(1,sqrt((sin((lat2 - lat1)/2))^2 + cos(lat1) * cos(lat2) * (sin( lon2 - lon1)/2))^2)))&lt;br&gt;
&lt;br&gt;
Note, there are a lot of code snippets out there, just google your preferred scripting language + great circle.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.52954-798535</guid>
		<pubDate>Tue, 12 Dec 2006 07:00:59 -0800</pubDate>
		<dc:creator>maxwelton</dc:creator>
	</item><item>
		<title>By: maxwelton</title>
		<link>http://ask.metafilter.com/52954/Zip-Code-Proximity-Search#798539</link>	
		<description>Doh! on preview. Old and slow.&lt;br&gt;
&lt;br&gt;
Note, I was unable to find any free databases of any country other than the US when I was involved in this many moons ago. Canada/UK post codes are very specific and many of the proprietary databases out there seem to have been built by brute force...and all were too pricey for my free web site.&lt;br&gt;
&lt;br&gt;
Good luck!</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.52954-798539</guid>
		<pubDate>Tue, 12 Dec 2006 07:03:16 -0800</pubDate>
		<dc:creator>maxwelton</dc:creator>
	</item><item>
		<title>By: ewagoner</title>
		<link>http://ask.metafilter.com/52954/Zip-Code-Proximity-Search#798563</link>	
		<description>What language are you writing in? Rails (for example) has a ready-made plugin that does this for you.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.52954-798563</guid>
		<pubDate>Tue, 12 Dec 2006 07:15:30 -0800</pubDate>
		<dc:creator>ewagoner</dc:creator>
	</item><item>
		<title>By: Wild_Eep</title>
		<link>http://ask.metafilter.com/52954/Zip-Code-Proximity-Search#798564</link>	
		<description>I wrote this calculation in PHP a while back... I broke down and bought a db of zip code to lat/long for &lt; $20, iirc.br&gt;
&lt;br&gt;
Client loved it. Got to see which potential clients were within what distance of a given booked client.&lt;/&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.52954-798564</guid>
		<pubDate>Tue, 12 Dec 2006 07:17:01 -0800</pubDate>
		<dc:creator>Wild_Eep</dc:creator>
	</item><item>
		<title>By: lowlife</title>
		<link>http://ask.metafilter.com/52954/Zip-Code-Proximity-Search#798576</link>	
		<description>&lt;small&gt;derail (no pun intended)...&lt;/small&gt;&lt;br&gt;
ewagoner, what&apos;s the plugin for rails? I just hand-built some code that does this for a soon-to-be-launched website, but I&apos;m curious to see how others might have approached the problem.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.52954-798576</guid>
		<pubDate>Tue, 12 Dec 2006 07:26:49 -0800</pubDate>
		<dc:creator>lowlife</dc:creator>
	</item><item>
		<title>By: GatorDavid</title>
		<link>http://ask.metafilter.com/52954/Zip-Code-Proximity-Search#798581</link>	
		<description>Thanks for the suggestions!&lt;br&gt;
&lt;br&gt;
I found &lt;a href=&quot;http://www.phpfever.com/gps-zip-code-radius-web-service.html&quot;&gt;a guy that provides this as a web service&lt;/a&gt;.  I guess I&apos;ll use this for now; I&apos;ll have to drop him a line to see if he expects this to be available permanently.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.52954-798581</guid>
		<pubDate>Tue, 12 Dec 2006 07:29:58 -0800</pubDate>
		<dc:creator>GatorDavid</dc:creator>
	</item><item>
		<title>By: ewagoner</title>
		<link>http://ask.metafilter.com/52954/Zip-Code-Proximity-Search#798588</link>	
		<description>For google&apos;s sake, &lt;a href=&quot;http://zipcodesearch.rubyforge.org/&quot;&gt;here&apos;s the Rails plugin&lt;/a&gt;.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.52954-798588</guid>
		<pubDate>Tue, 12 Dec 2006 07:38:51 -0800</pubDate>
		<dc:creator>ewagoner</dc:creator>
	</item>
	</channel>
</rss>
