Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member medlington's Avatar
    Join Date
    Nov 2005
    Location
    Sheffield, UK
    Posts
    377
    Member #
    11968
    Liked
    4 times
    Hi,

    Im creating a site which will display job listings. Its going to be a nationwide (UK) site hosting jobs from all over the country. All the jobs and user data will be stored in a database so they will be searchable.

    My problem is that my client wants the users to be able to search for jobs in certain locations and then within a certain distance of that location. How would I go about setting this up? would I have to enter all the UK cities and postcodes and setup some relationship between them all so it could figure out which ones were relevant?

    That seems like a lot of work to me and Im sure there must be an easier way to do it. Does anyone know any plugins or scripts I could use to make this task easier?

    Thanks

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,724
    Member #
    5580
    Liked
    718 times
    In the US, we use Zip Codes.
    There is a free online database that has a listing of Zip Codes, along with
    the GPS coordinates of the locations, cities, etc. Using some math (geometry)
    that is easily found using Google, the closest location can be found, and even
    a Google Maps displayed.

    If you can find an online database like that for Europe/Great Britain, you could
    use the same thing. There must be something like that.

    This is where one can find the US Zipcode database(s):
    http://www.google.com/search?hl=en&q...&oq=&aqi=g-sx1

    You might try a search like this?
    http://www.google.com/search?hl=en&q...&aq=f&oq=&aqi=

    It's also possible that you might have to pay for access to someone else's database?


  4. #3
    Senior Member medlington's Avatar
    Join Date
    Nov 2005
    Location
    Sheffield, UK
    Posts
    377
    Member #
    11968
    Liked
    4 times
    Thanks for the info,

    After quite alot of searching I've found a UK DB of postcodes that I should be able to use, it has more info than I should need but I have a couple of concerns about it:

    1. Its massive, about 1.5 million lines, is this going to cause me problems? I have already had to split it just to view it in excel.

    2. Im not exactly sure that the data is correct as I have found the postcode I am at and then run a GPS check on my phone and it comes up with different coordinates. The coordinates that the DB gives me are: -1.509954 53.37434

    yet my phone is telling me Im at: 1.303042 53.222964

    should I be concerned about this?

    Now I need to know how to use the data, is the idea that I get the user to input their postcode, then I get the coordinates from the database for that postcode. Then I work out what say 10 miles is in latitude and longitude which should then give me a range of latitude and longitude to work with, then I can get a list of all postcodes within that range and then cross reference that with my DB of jobs to display all jobs in that area?

    For anyone who stumbles on this post through a search engine and needs the postcode DB I found then info about it is here:

    UK PostCodes

    Thanks again

  5. #4
    Senior Member medlington's Avatar
    Join Date
    Nov 2005
    Location
    Sheffield, UK
    Posts
    377
    Member #
    11968
    Liked
    4 times
    Having just checked those coordinates in google maps I've realised there the wrong way round for a start. Both sets of coordinates had me sat in the middle of the indian ocean. Now I've flipped them round the ones from the DB look correct and the one from my phone is saying Im in the North Sea so must be wrong.

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,724
    Member #
    5580
    Liked
    718 times
    First, if you go to Google Maps and enter this in the search box (copy and paste it) ...
    53.37434,-1.509954

    Is it showing the correct location for you?

    Here's the Google map page:
    http://maps.google.com/maps?hl=en&tab=wl

    I'm guessing because that is from the database, it's showing the center
    of the postcode area ... the exact center of that postcode?

    ==================

    I would think it is important to have that huge database installed into
    a MySQL database ... not sure if you can do that or not (or how large it will be).
    To search it as a text file would take a ton of processing time.

    With such a large file, and not sure how you can install that database,
    I wonder how much a company like this charges to use their database and API?
    http://www.allies-computing.co.uk/index.html

    Find out if it's worth using a service like that for your site.

    Basically, you give them a target postcode and the user's postcode and
    they return whatever information you need. Closest, within a radius, etc.

    They offer a free trial ... it might be worth checking into.


    .



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:37 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com