Professional Web Applications Themes

'How do they do that' long/lat/nearest in miles to an attraction - PHP Development

Hello I wonder if anyone can help. I would like to know how certain sites: [url]http://aboutbritain.com/ArundelCastle.htm[/url], and [url]http://travel.knowhere.co.uk/place/+bristol-0/[/url] manage to put approx mile distances between their listed towns and attractions. You will see it on the knowhere.co.uk site on the right side where they list nearby towns and on aboutbritain.com you will see it where they list other nearby attractions and hotels towards the bottom of the page. I guess they store longitude/latitude in their database so they can pinpoint each attraction/hotel ETC, but what then. How do they calculate distances between those hotels and attractions and other towns? Also, ...

  1. #1

    Default 'How do they do that' long/lat/nearest in miles to an attraction

    Hello
    I wonder if anyone can help.

    I would like to know how certain sites:
    [url]http://aboutbritain.com/ArundelCastle.htm[/url], and
    [url]http://travel.knowhere.co.uk/place/+bristol-0/[/url] manage to put approx mile
    distances between their listed towns and attractions.
    You will see it on the knowhere.co.uk site on the right side where they list
    nearby towns and on aboutbritain.com you will see it where they list other
    nearby attractions and hotels towards the bottom of the page.
    I guess they store longitude/latitude in their database so they can pinpoint
    each attraction/hotel ETC, but what then. How do they calculate distances
    between those hotels and attractions and other towns?

    Also, the database on my site has alot of places stored but with postcodes.
    Is there a way of converting postcodes into approximate long/lat positions?
    Like a universally available table or something?

    My programmer is back tomorrow from his holidays and I'm trying to gather as
    much information about 'how it's done' so I can get a similiar system
    implemented on my website. My new website will be describing thousands of
    British villages and storing them in a mySQL database and I'm looking at
    ways of listing the nearest attractions to them. The site uses alot of php.
    If my programmer does not contact me on his return (he often obsconds for
    lengthy periods) I will be looking for someone who can do this sort of work
    and other work. Must be reasonable! and reliable!

    If anyone can help I'd be most grateful.

    Kind Regards,
    Jayne Wolps


    Jayne Wolps Guest

  2. #2

    Default Re: 'How do they do that' long/lat/nearest in miles to an attraction

    On Mon, 23 Feb 2004 13:08:30 +0000 (UTC), "Jayne Wolps"
    <jaynewolps(nospam)hotmail.com> wrote:
    >Hello
    >I wonder if anyone can help.
    >
    >I would like to know how certain sites:
    >[url]http://aboutbritain.com/ArundelCastle.htm[/url], and
    >[url]http://travel.knowhere.co.uk/place/+bristol-0/[/url] manage to put approx mile
    >distances between their listed towns and attractions.
    >You will see it on the knowhere.co.uk site on the right side where they list
    >nearby towns and on aboutbritain.com you will see it where they list other
    >nearby attractions and hotels towards the bottom of the page.
    >I guess they store longitude/latitude in their database so they can pinpoint
    >each attraction/hotel ETC, but what then. How do they calculate distances
    >between those hotels and attractions and other towns?
    >
    >Also, the database on my site has alot of places stored but with postcodes.
    >Is there a way of converting postcodes into approximate long/lat positions?
    >Like a universally available table or something?
    >
    >My programmer is back tomorrow from his holidays and I'm trying to gather as
    >much information about 'how it's done' so I can get a similiar system
    >implemented on my website. My new website will be describing thousands of
    >British villages and storing them in a mySQL database and I'm looking at
    >ways of listing the nearest attractions to them. The site uses alot of php.
    >If my programmer does not contact me on his return (he often obsconds for
    >lengthy periods) I will be looking for someone who can do this sort of work
    >and other work. Must be reasonable! and reliable!
    >
    >If anyone can help I'd be most grateful.
    >
    >Kind Regards,
    >Jayne Wolps
    See:
    [url]http://www.sanisoft.com/ziploc/[/url]

    I would imagine there is data somewhere which you could plug into this
    for the UK.

    Tyrone Slothrop Guest

  3. #3

    Default Re: 'How do they do that' long/lat/nearest in miles to an attraction

    On Mon, 23 Feb 2004 13:08:30 +0000 (UTC), "Jayne Wolps"
    <jaynewolps(nospam)hotmail.com> wrote:
    >Hello
    >I wonder if anyone can help.
    >
    >I would like to know how certain sites:
    >[url]http://aboutbritain.com/ArundelCastle.htm[/url], and
    >[url]http://travel.knowhere.co.uk/place/+bristol-0/[/url] manage to put approx mile
    >distances between their listed towns and attractions.
    >You will see it on the knowhere.co.uk site on the right side where they list
    >nearby towns and on aboutbritain.com you will see it where they list other
    >nearby attractions and hotels towards the bottom of the page.
    >I guess they store longitude/latitude in their database so they can pinpoint
    >each attraction/hotel ETC, but what then. How do they calculate distances
    >between those hotels and attractions and other towns?
    >
    >Also, the database on my site has alot of places stored but with postcodes.
    >Is there a way of converting postcodes into approximate long/lat positions?
    >Like a universally available table or something?
    >
    >My programmer is back tomorrow from his holidays and I'm trying to gather as
    >much information about 'how it's done' so I can get a similiar system
    >implemented on my website. My new website will be describing thousands of
    >British villages and storing them in a mySQL database and I'm looking at
    >ways of listing the nearest attractions to them. The site uses alot of php.
    >If my programmer does not contact me on his return (he often obsconds for
    >lengthy periods) I will be looking for someone who can do this sort of work
    >and other work. Must be reasonable! and reliable!
    >
    >If anyone can help I'd be most grateful.
    >
    >Kind Regards,
    >Jayne Wolps
    >
    Jayne

    PostCodes won't help as they are not arranged in that way in the UK. I
    think a better and much more accurate way would be to use their grid
    coordinates. The Ordinance Survey grid is arranged in Eastings and
    Northings and is measured in metres so a straightforward search in a
    database for all locations within a rectangle around your location is
    fairly easy. The distance can be calculated using simple trig. Lats
    and Longs could also be used but the maths get a bit tricky. You can
    also pass on the grid reference so that users can find the location on
    their map or provide a button to link to a mapping web site. If you
    want to add a map to your web pages, try [url]http://www.map24.co.uk[/url]

    regards
    Trevor
    Trevor Smith Guest

Similar Threads

  1. Finding nearest...
    By Strelok001 in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 1
    Last Post: June 10th, 09:40 PM
  2. Rounding to nearest 100
    By ccnorris in forum Coldfusion - Advanced Techniques
    Replies: 4
    Last Post: May 30th, 11:44 PM
  3. Query, Join on nearest
    By Tommy in forum Microsoft SQL / MS SQL Server
    Replies: 5
    Last Post: July 10th, 08:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139