{"id":37,"date":"2008-03-27T01:03:49","date_gmt":"2008-03-27T07:03:49","guid":{"rendered":"https:\/\/jackdonnell.com\/?p=37"},"modified":"2008-03-28T15:14:18","modified_gmt":"2008-03-28T21:14:18","slug":"c-calculating-distance-between-zipcodes","status":"publish","type":"post","link":"https:\/\/jackdonnell.com\/?p=37","title":{"rendered":"C# &#8211; Calculating Distance between Zipcodes"},"content":{"rendered":"<p>Calculating the distance between ZIP codes has become a common feature in search engines. For instance, if you\u2019re searching for restaurants, a Web site will often allow you to enter a ZIP code and display all of the restaurants within X miles of that ZIP code. Here is one way application developers to implement a ZIP code distance calculator using the .NET Framework and C#.<\/p>\n<p>This article uses a derivation of the Haversine formula to calculate the distance between ZIP codes. The Haversine formula is used to determine the distance between two points on a sphere &#8211; in this case the earth. While this isn\u2019t 100 percent accurate due to the earth not being a perfect sphere, it is probably as close as you\u2019re going to get without getting out the tape measure!<\/p>\n<p>Author: Zach Smith<br \/>\nFind TechRepublic Article <a target=\"zippy\" href=\"http:\/\/blogs.techrepublic.com.com\/programming-and-development\/?p=634&amp;tag=nl.e416\">Here<\/a>.<\/p>\n<p align=left><a href=\"https:\/\/jackdonnell.com\/wp-content\/uploads\/2008\/03\/zipcode.gif\" title=\"Formula for techrepublic for Zipcode calculation of distances\"><img decoding=\"async\" src=\"https:\/\/jackdonnell.com\/wp-content\/uploads\/2008\/03\/zipcode.thumbnail.gif\" alt=\"Formula for techrepublic for Zipcode calculation of distances\" \/><\/a><\/p>\n<p>Download PDF and Code <a target=\"dloadzippy\" href=\"http:\/\/downloads.techrepublic.com.com\/abstract.aspx?docid=347285\">Here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Calculating the distance between ZIP codes has become a common feature in search engines. For instance, if you\u2019re searching for restaurants, a Web site will often allow you to enter a ZIP code and display all of the restaurants within &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/jackdonnell.com\/?p=37\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[58,138,113],"tags":[145,144,42,148,146,147,302,143],"class_list":["post-37","post","type-post","status-publish","format-standard","hentry","category-os","category-programming","category-reportingbi","tag-net","tag-c","tag-code","tag-formula","tag-framework","tag-haversine","tag-programming","tag-zip"],"_links":{"self":[{"href":"https:\/\/jackdonnell.com\/index.php?rest_route=\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jackdonnell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jackdonnell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jackdonnell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jackdonnell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=37"}],"version-history":[{"count":0,"href":"https:\/\/jackdonnell.com\/index.php?rest_route=\/wp\/v2\/posts\/37\/revisions"}],"wp:attachment":[{"href":"https:\/\/jackdonnell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jackdonnell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jackdonnell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}