locked
proximity search RRS feed

  • Question

  • User-44640224 posted

    Does anyone know of a .Net api (other than google) that I can use for doing a proximity search?  Basically what I am trying to do is have a "location closest to you" page on my company's website.  I have all our location in a database and I can do the search by state but I really want to do a search by zip code.  Does anyone have any suggestion?

    Friday, January 2, 2009 3:40 PM

Answers

  • User-2110079211 posted

     you can do that easily on a stored procedure, you really dont need a .NET API. Check this link out. I used this in few projects of mine. It almost matches with any GIS

    http://www.sqljunkies.ddj.com/Article/21DC68CD-1A97-4909-8157-523CA249CC80.scuk 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 2, 2009 5:47 PM
  • User1566012831 posted

    Are you running SQL 2008?  If so, the new spatial query feature can do what you want if your location data is already geocoded.

    If you also need geocoding, there are several sources other than Google: Windows Live, MapPoint, Yahoo, etc.  There is also public domain data available that maps zip codes to latitude/longitude.

    As a really crude solution, you could compare zip codes based on the number of digits matched from the left.  So 90210 would be closer to 90299 (3 digits matched) than to 90199 (2 digits matched).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, January 3, 2009 5:46 AM

All replies

  • User-2110079211 posted

     you can do that easily on a stored procedure, you really dont need a .NET API. Check this link out. I used this in few projects of mine. It almost matches with any GIS

    http://www.sqljunkies.ddj.com/Article/21DC68CD-1A97-4909-8157-523CA249CC80.scuk 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 2, 2009 5:47 PM
  • User1566012831 posted

    Are you running SQL 2008?  If so, the new spatial query feature can do what you want if your location data is already geocoded.

    If you also need geocoding, there are several sources other than Google: Windows Live, MapPoint, Yahoo, etc.  There is also public domain data available that maps zip codes to latitude/longitude.

    As a really crude solution, you could compare zip codes based on the number of digits matched from the left.  So 90210 would be closer to 90299 (3 digits matched) than to 90199 (2 digits matched).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, January 3, 2009 5:46 AM