Radius Search

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • momo

    Radius Search

    Can anyone help me? I am writing an ASP.NET app. and I need to be able to
    have people search based on X radius of a zip code. Please help.

    Thanks,

    Momo


  • George Durzi

    #2
    Re: Radius Search

    Crap! I did this a few years ago but don't have the code anymore ... But
    here's the idea, you're gonna have to hunt down and find the stuff though.

    I got a hold of a database of every US zip code geocoded. So every zip code
    had a Lat and a Long.

    There's a simple formula to measure the distance (as the crow flies) between
    two co-ordinates on the earth. The original formula is complex because it
    takes into account the curvature of the earth, but in it's simplified form,
    it gives good results with a very acceptable (small) margin of error.

    Let's use the example of car dealerships, you have a table of them, with a
    zip code for each.

    Since you have your search zip code, you can lookup its Lat and Long, and
    perform a search of all "car dealerships" within x miles of your search zip
    code.

    Having the formula and the zip code geocode table makes this a piece of
    cake. sorry I can't find them :(

    "momo" <searchengine@s eeourweb.com> wrote in message
    news:uUbpYn8nDH A.3288@tk2msftn gp13.phx.gbl...[color=blue]
    > Can anyone help me? I am writing an ASP.NET app. and I need to be able to
    > have people search based on X radius of a zip code. Please help.
    >
    > Thanks,
    >
    > Momo
    >
    >[/color]


    Comment

    • George Durzi

      #3
      Re: Radius Search

      Explore the latest news and expert commentary on IT Management brought to you by the editors of ITPro Today


      "George Durzi" <gdurzi@hotmail .com> wrote in message
      news:urRRYt8nDH A.644@TK2MSFTNG P11.phx.gbl...[color=blue]
      > Crap! I did this a few years ago but don't have the code anymore ... But
      > here's the idea, you're gonna have to hunt down and find the stuff though.
      >
      > I got a hold of a database of every US zip code geocoded. So every zip[/color]
      code[color=blue]
      > had a Lat and a Long.
      >
      > There's a simple formula to measure the distance (as the crow flies)[/color]
      between[color=blue]
      > two co-ordinates on the earth. The original formula is complex because it
      > takes into account the curvature of the earth, but in it's simplified[/color]
      form,[color=blue]
      > it gives good results with a very acceptable (small) margin of error.
      >
      > Let's use the example of car dealerships, you have a table of them, with a
      > zip code for each.
      >
      > Since you have your search zip code, you can lookup its Lat and Long, and
      > perform a search of all "car dealerships" within x miles of your search[/color]
      zip[color=blue]
      > code.
      >
      > Having the formula and the zip code geocode table makes this a piece of
      > cake. sorry I can't find them :(
      >
      > "momo" <searchengine@s eeourweb.com> wrote in message
      > news:uUbpYn8nDH A.3288@tk2msftn gp13.phx.gbl...[color=green]
      > > Can anyone help me? I am writing an ASP.NET app. and I need to be able[/color][/color]
      to[color=blue][color=green]
      > > have people search based on X radius of a zip code. Please help.
      > >
      > > Thanks,
      > >
      > > Momo
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • George Durzi

        #4
        Re: Radius Search

        Licensed Zip Code Data - Low Prices with Monthly Updates - Rated #1 Since 2002. Commercial ZIP Code Database Used by Most Fortune 500 Companies. Immediate download.



        Hope this helps.


        "George Durzi" <gdurzi@hotmail .com> wrote in message
        news:urRRYt8nDH A.644@TK2MSFTNG P11.phx.gbl...[color=blue]
        > Crap! I did this a few years ago but don't have the code anymore ... But
        > here's the idea, you're gonna have to hunt down and find the stuff though.
        >
        > I got a hold of a database of every US zip code geocoded. So every zip[/color]
        code[color=blue]
        > had a Lat and a Long.
        >
        > There's a simple formula to measure the distance (as the crow flies)[/color]
        between[color=blue]
        > two co-ordinates on the earth. The original formula is complex because it
        > takes into account the curvature of the earth, but in it's simplified[/color]
        form,[color=blue]
        > it gives good results with a very acceptable (small) margin of error.
        >
        > Let's use the example of car dealerships, you have a table of them, with a
        > zip code for each.
        >
        > Since you have your search zip code, you can lookup its Lat and Long, and
        > perform a search of all "car dealerships" within x miles of your search[/color]
        zip[color=blue]
        > code.
        >
        > Having the formula and the zip code geocode table makes this a piece of
        > cake. sorry I can't find them :(
        >
        > "momo" <searchengine@s eeourweb.com> wrote in message
        > news:uUbpYn8nDH A.3288@tk2msftn gp13.phx.gbl...[color=green]
        > > Can anyone help me? I am writing an ASP.NET app. and I need to be able[/color][/color]
        to[color=blue][color=green]
        > > have people search based on X radius of a zip code. Please help.
        > >
        > > Thanks,
        > >
        > > Momo
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • momo

          #5
          Re: Radius Search

          Thank George this will help.

          Momo


          "George Durzi" <gdurzi@hotmail .com> wrote in message
          news:urRRYt8nDH A.644@TK2MSFTNG P11.phx.gbl...[color=blue]
          > Crap! I did this a few years ago but don't have the code anymore ... But
          > here's the idea, you're gonna have to hunt down and find the stuff though.
          >
          > I got a hold of a database of every US zip code geocoded. So every zip[/color]
          code[color=blue]
          > had a Lat and a Long.
          >
          > There's a simple formula to measure the distance (as the crow flies)[/color]
          between[color=blue]
          > two co-ordinates on the earth. The original formula is complex because it
          > takes into account the curvature of the earth, but in it's simplified[/color]
          form,[color=blue]
          > it gives good results with a very acceptable (small) margin of error.
          >
          > Let's use the example of car dealerships, you have a table of them, with a
          > zip code for each.
          >
          > Since you have your search zip code, you can lookup its Lat and Long, and
          > perform a search of all "car dealerships" within x miles of your search[/color]
          zip[color=blue]
          > code.
          >
          > Having the formula and the zip code geocode table makes this a piece of
          > cake. sorry I can't find them :(
          >
          > "momo" <searchengine@s eeourweb.com> wrote in message
          > news:uUbpYn8nDH A.3288@tk2msftn gp13.phx.gbl...[color=green]
          > > Can anyone help me? I am writing an ASP.NET app. and I need to be able[/color][/color]
          to[color=blue][color=green]
          > > have people search based on X radius of a zip code. Please help.
          > >
          > > Thanks,
          > >
          > > Momo
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • JL

            #6
            Re: Radius Search

            "momo" <searchengine@s eeourweb.com> wrote in message news:<uUbpYn8nD HA.3288@tk2msft ngp13.phx.gbl>. ..[color=blue]
            > Can anyone help me? I am writing an ASP.NET app. and I need to be able to
            > have people search based on X radius of a zip code. Please help.
            >
            > Thanks,
            >
            > Momo[/color]

            KJL Software has a free Distance DLL on the freeware page
            (www.kjlsoftware.com/freeware.html). You pass a from lat/lon and a to
            lat/lon and it returns the distance

            HTH

            JL

            Comment

            Working...