Zipcode lookup by proximity...

Discussion in 'ASP General' started by William Morris, Jun 9, 2004.

  1. Looking for a source for data and/or algorithm that would allow me to enter
    a zipcode and find - in our case - every car dealership that sells, say,
    Chevy's in that zipcode - if not there, then what about adjacent
    zipcodes..? - in an ever expanding circle outward, and return a list of
    those zipcodes.

    In my database, I've already got the car dealers and available makes. What
    I need is the zipcode "map" reference. Ideas, sources?

    - Wm

    --
    William Morris
    Product Development, Seritas LLC
    Kansas City, Missouri
     
    William Morris, Jun 9, 2004
    #1
    1. Advertising

  2. William Morris

    Steven Burn Guest

    If you've already got the info in the database, then all you need to do is
    select from it, based on certain parameters. For example;

    strManufacterer = "Ferrari"
    strModel = "F50"
    strZipCode = "119911"

    rst.Open "Select Model From tblCars Where Zip = '" & strZipCode _
    & "' and Manufacterer = '" & strManufacterer & "' and model =
    '" & _
    strModel & "'", DB, adOpenStatic, adLockPessimistic

    --

    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!


    "William Morris" <> wrote in
    message news:...
    > Looking for a source for data and/or algorithm that would allow me to

    enter
    > a zipcode and find - in our case - every car dealership that sells, say,
    > Chevy's in that zipcode - if not there, then what about adjacent
    > zipcodes..? - in an ever expanding circle outward, and return a list of
    > those zipcodes.
    >
    > In my database, I've already got the car dealers and available makes.

    What
    > I need is the zipcode "map" reference. Ideas, sources?
    >
    > - Wm
    >
    > --
    > William Morris
    > Product Development, Seritas LLC
    > Kansas City, Missouri
    >
    >
     
    Steven Burn, Jun 9, 2004
    #2
    1. Advertising

  3. You will need a zip code -> lat / long database. You can find some free
    ones out there, but the quality isn't very good (you get what you pay for).
    There is a mathematical formula that will tell you the distance between two
    points, given the lat/long of each. So, you take the dealer's zip code,
    find the lat and long, then you have a function or procedure that finds all
    the zip codes where (formula) < 5 miles.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)





    "William Morris" <> wrote in
    message news:...
    > Looking for a source for data and/or algorithm that would allow me to
    > enter
    > a zipcode and find - in our case - every car dealership that sells, say,
    > Chevy's in that zipcode - if not there, then what about adjacent
    > zipcodes..? - in an ever expanding circle outward, and return a list of
    > those zipcodes.
    >
    > In my database, I've already got the car dealers and available makes.
    > What
    > I need is the zipcode "map" reference. Ideas, sources?
    >
    > - Wm
    >
    > --
    > William Morris
    > Product Development, Seritas LLC
    > Kansas City, Missouri
    >
    >
     
    Aaron [SQL Server MVP], Jun 10, 2004
    #3
  4. Precisely what I was looking for. Thank you, Aaron. I don't suppose you
    have any links handy, or the formula?

    - Wm


    --
    William Morris
    Product Development, Seritas LLC
    Kansas City, Missouri

    "Aaron [SQL Server MVP]" <> wrote in message
    news:...
    > You will need a zip code -> lat / long database. You can find some free
    > ones out there, but the quality isn't very good (you get what you pay

    for).
    > There is a mathematical formula that will tell you the distance between

    two
    > points, given the lat/long of each. So, you take the dealer's zip code,
    > find the lat and long, then you have a function or procedure that finds

    all
    > the zip codes where (formula) < 5 miles.
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
    >
    >
    >
    > "William Morris" <> wrote in
    > message news:...
    > > Looking for a source for data and/or algorithm that would allow me to
    > > enter
    > > a zipcode and find - in our case - every car dealership that sells, say,
    > > Chevy's in that zipcode - if not there, then what about adjacent
    > > zipcodes..? - in an ever expanding circle outward, and return a list of
    > > those zipcodes.
    > >
    > > In my database, I've already got the car dealers and available makes.
    > > What
    > > I need is the zipcode "map" reference. Ideas, sources?
    > >
    > > - Wm
    > >
    > > --
    > > William Morris
    > > Product Development, Seritas LLC
    > > Kansas City, Missouri
    > >
    > >

    >
    >
     
    William Morris, Jun 10, 2004
    #4
  5. William Morris

    James Baker Guest

    http://www.mathforum.com/library/drmath/view/51711.html

    Pretty simple explanation, looks right.

    James


    "William Morris" <> wrote in
    message news:...
    > Precisely what I was looking for. Thank you, Aaron. I don't suppose you
    > have any links handy, or the formula?
    >
    > - Wm
    >
    >
    > --
    > William Morris
    > Product Development, Seritas LLC
    > Kansas City, Missouri
    >
    > "Aaron [SQL Server MVP]" <> wrote in message
    > news:...
    > > You will need a zip code -> lat / long database. You can find some free
    > > ones out there, but the quality isn't very good (you get what you pay

    > for).
    > > There is a mathematical formula that will tell you the distance between

    > two
    > > points, given the lat/long of each. So, you take the dealer's zip code,
    > > find the lat and long, then you have a function or procedure that finds

    > all
    > > the zip codes where (formula) < 5 miles.
    > >
    > > --
    > > http://www.aspfaq.com/
    > > (Reverse address to reply.)
    > >
    > >
    > >
    > >
    > >
    > > "William Morris" <> wrote in
    > > message news:...
    > > > Looking for a source for data and/or algorithm that would allow me to
    > > > enter
    > > > a zipcode and find - in our case - every car dealership that sells,

    say,
    > > > Chevy's in that zipcode - if not there, then what about adjacent
    > > > zipcodes..? - in an ever expanding circle outward, and return a list

    of
    > > > those zipcodes.
    > > >
    > > > In my database, I've already got the car dealers and available makes.
    > > > What
    > > > I need is the zipcode "map" reference. Ideas, sources?
    > > >
    > > > - Wm
    > > >
    > > > --
    > > > William Morris
    > > > Product Development, Seritas LLC
    > > > Kansas City, Missouri
    > > >
    > > >

    > >
    > >

    >
    >
     
    James Baker, Jun 10, 2004
    #5
  6. For the database:
    http://www.google.com/search?hl=en&ie=UTF-8&q=zip code latitude longitude database

    For the formula:
    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&q=formula distance zip code latitude longitude

    I'm about to write an article about this, but the solution will use SQL
    Server. If you're using SQL Server, and can wait for a bit, you might want
    to wait for a bit.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "William Morris" <> wrote in
    message news:...
    > Precisely what I was looking for. Thank you, Aaron. I don't suppose you
    > have any links handy, or the formula?
    >
    > - Wm
    >
    >
    > --
    > William Morris
    > Product Development, Seritas LLC
    > Kansas City, Missouri
    >
    > "Aaron [SQL Server MVP]" <> wrote in message
    > news:...
    > > You will need a zip code -> lat / long database. You can find some free
    > > ones out there, but the quality isn't very good (you get what you pay

    > for).
    > > There is a mathematical formula that will tell you the distance between

    > two
    > > points, given the lat/long of each. So, you take the dealer's zip code,
    > > find the lat and long, then you have a function or procedure that finds

    > all
    > > the zip codes where (formula) < 5 miles.
    > >
    > > --
    > > http://www.aspfaq.com/
    > > (Reverse address to reply.)
    > >
    > >
    > >
    > >
    > >
    > > "William Morris" <> wrote in
    > > message news:...
    > > > Looking for a source for data and/or algorithm that would allow me to
    > > > enter
    > > > a zipcode and find - in our case - every car dealership that sells,

    say,
    > > > Chevy's in that zipcode - if not there, then what about adjacent
    > > > zipcodes..? - in an ever expanding circle outward, and return a list

    of
    > > > those zipcodes.
    > > >
    > > > In my database, I've already got the car dealers and available makes.
    > > > What
    > > > I need is the zipcode "map" reference. Ideas, sources?
    > > >
    > > > - Wm
    > > >
    > > > --
    > > > William Morris
    > > > Product Development, Seritas LLC
    > > > Kansas City, Missouri
    > > >
    > > >

    > >
    > >

    >
    >
     
    Aaron [SQL Server MVP], Jun 10, 2004
    #6
  7. Actually, we are using SQL Server. The links are great, too. Our list is
    small enough at this point that listing every dealer on one page is a
    perfectly acceptable solution for the next few months, so, yeah, it can
    wait. This'll give me something I can take to the next planning meeting and
    hopefully buy myself some time.

    - Wm

    "Aaron [SQL Server MVP]" <> wrote in message
    news:...
    > For the database:
    >

    http://www.google.com/search?hl=en&ie=UTF-8&q=zip code latitude longitude database
    >
    > For the formula:
    >

    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&q=formula distance zip code latitude longitude
    >
    > I'm about to write an article about this, but the solution will use SQL
    > Server. If you're using SQL Server, and can wait for a bit, you might

    want
    > to wait for a bit.
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
    >
    >
    > "William Morris" <> wrote in
    > message news:...
    > > Precisely what I was looking for. Thank you, Aaron. I don't suppose

    you
    > > have any links handy, or the formula?
    > >
    > > - Wm
    > >
    > >
    > > --
    > > William Morris
    > > Product Development, Seritas LLC
    > > Kansas City, Missouri
    > >
    > > "Aaron [SQL Server MVP]" <> wrote in message
    > > news:...
    > > > You will need a zip code -> lat / long database. You can find some

    free
    > > > ones out there, but the quality isn't very good (you get what you pay

    > > for).
    > > > There is a mathematical formula that will tell you the distance

    between
    > > two
    > > > points, given the lat/long of each. So, you take the dealer's zip

    code,
    > > > find the lat and long, then you have a function or procedure that

    finds
    > > all
    > > > the zip codes where (formula) < 5 miles.
    > > >
    > > > --
    > > > http://www.aspfaq.com/
    > > > (Reverse address to reply.)
    > > >
    > > >
    > > >
    > > >
    > > >
    > > > "William Morris" <> wrote in
    > > > message news:...
    > > > > Looking for a source for data and/or algorithm that would allow me

    to
    > > > > enter
    > > > > a zipcode and find - in our case - every car dealership that sells,

    > say,
    > > > > Chevy's in that zipcode - if not there, then what about adjacent
    > > > > zipcodes..? - in an ever expanding circle outward, and return a list

    > of
    > > > > those zipcodes.
    > > > >
    > > > > In my database, I've already got the car dealers and available

    makes.
    > > > > What
    > > > > I need is the zipcode "map" reference. Ideas, sources?
    > > > >
    > > > > - Wm
    > > > >
    > > > > --
    > > > > William Morris
    > > > > Product Development, Seritas LLC
    > > > > Kansas City, Missouri
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    William Morris, Jun 10, 2004
    #7
  8. FYI, "about to" in this specific case means either tonight (time permitting)
    or early next week. I had already worked on a similar solution for a
    client, and adapting that work slightly will make for a good, workable
    example that can be used for similar scenarios.

    For future reference, my "about to" has various meanings, given context,
    mood, schedule, and level of effort. ;-)

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "William Morris" <> wrote in
    message news:...
    > Actually, we are using SQL Server. The links are great, too. Our list is
    > small enough at this point that listing every dealer on one page is a
    > perfectly acceptable solution for the next few months, so, yeah, it can
    > wait. This'll give me something I can take to the next planning meeting

    and
    > hopefully buy myself some time.
    >
    > - Wm
     
    Aaron [SQL Server MVP], Jun 10, 2004
    #8
  9. Aaron [SQL Server MVP], Jun 11, 2004
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DaveF

    ZIPCODE DB ACCESS TO SQL

    DaveF, Sep 29, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    434
    Scott M.
    Sep 30, 2004
  2. michy

    lucene fuzzy and proximity

    michy, Oct 19, 2006, in forum: Java
    Replies:
    0
    Views:
    508
    michy
    Oct 19, 2006
  3. Jeff Thur

    Need to Format a zipcode into xxxxx-xxxx.

    Jeff Thur, Feb 18, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    193
  4. Grayson Piercee

    network proximity calculation

    Grayson Piercee, Nov 21, 2008, in forum: Ruby
    Replies:
    1
    Views:
    282
  5. Stuart Clarke

    Proximity searches in Ruby

    Stuart Clarke, Dec 5, 2008, in forum: Ruby
    Replies:
    13
    Views:
    229
    Jens Wille
    Dec 8, 2008
Loading...

Share This Page