SitePoint Sponsor

User Tag List

Page 3 of 3 FirstFirst 123
Results 51 to 64 of 64
  1. #51
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm now trying to do a rail calculator.

    I'm not really building a site like this co2 one, but it just happens to have the right airplane/rail calculator I'm looking for.


    I've tried contacting Network Rail, but that didn't help.


    Does anyone know of any databases or tools I could use to get the long/lat of Railway Stations in the UK?


    Thanks for your time.

  2. #52
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Try here, the links have the Longs & lats hard coded into them.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  3. #53
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey SB, it's me again! Brilliant link, you're a master at finding the unfindable.

    So should I be looking to download the entire POI file? I downloaded the CSV file, but think it'll take ages to copy n paste the l/l values to my sql table.

    I'm just looking to cover Scotland, England, Wales and NI.


    Thanks again for all your help.

  4. #54
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Download the whole file, then write a quick parser to extract the values you need.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  5. #55
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks again SB.

    Just to confirm I've to download this GARMIN POI - CSV file.


    Sorry again to ask, but can you point me in the right direction for a parser? I'm not so great with the real techy work.

    I guess I'm looking to have my sql table like:

    id | rail_name | long | lat ?


    Really appreciate all your help once more, I'm in awe of your skills

  6. #56
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    If you download the Google KML format, you can just use PHP's built-in XML parsers, SimpleXML, DOMDocument etc to get the relevant information.

    Post a sample of the KML here, I'll I'm sure we could come up with a fairly easy solution for you.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  7. #57
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Crikey, £4 for the Google KML format. Do you think it's worth it? I'm guessing so.

    If you could help, I'd be over the moon, I'll try to keep it to one page too heh

  8. #58
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Do they charge for all formats? Is there a free one?
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  9. #59
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seems to be.

    The free ones are CSV, GPX.

    Seems to cost £4 just to signup at the forums. http://www.gps-data-team.com/pda-gps...?mode=register
    If you try selecting the 2 'Google Earth' KML links, they'll link to their forums, then to PayPal

    They also seem to have it in .txt format, but it looks even worse to convert to mysql as it doesn't have the station names next to it

  10. #60
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    So its 4 quid for each POI download?

  11. #61
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Here you go, I've attached the full SQL query for you in a zip.

    Code:
    INSERT INTO table (name, lon, lat)VALUES 
    ('Abbey Wood', '0.1203992', '51.4908008'),
    ('Aber', '-3.2305002', '51.5755005'),
    ('Abercynon North', '-3.3274401', '51.6450102'),
    ('Abercynon South', '-3.3294704', '51.6434302'),
    ('Aberdare', '-3.4415009', '51.7147005'),
    ('Aberdeen', '-2.0985010', '57.1435007'),
    ('Aberdour', '-3.3005002', '56.0545005'),
    ('Aberdovey', '-4.0560709', '52.5443400'),
    ('Abererch', '-4.3747008', '52.8985010'),
    ('Abergavenny', '-3.0091009', '51.8177006'),
    ('Abergele and Pensarn', '-3.5824004', '53.2949008'),
    ('Aberystwyth', '-4.0817101', '52.4139801'),
    ('Accrington', '-2.3698006', '53.7532001'),
    ('Achanalt', '-4.9131006', '57.6098009'),
    ('Achnasheen', '-5.0721003', '57.5796005'),
    ('Achnashellach', '-5.3326002', '57.4816007'),
    ('Acklington', '-1.6522706', '55.3073103'),
    ('Acle', '1.5428999', '52.6347001'),
    ('Acocks Green', '-1.8193707', '52.4499003'),
    ('Acton Bridge', '-2.6030506', '53.2666505'),
    ('Acton Central', '-0.2629008', '51.5087009'),
    ('Acton Main Line', '-0.2670007', '51.5172008'),
    ('Adderley Park', '-1.8545004', '52.4835004'),
    ('Addiewell', '-3.6047605', '55.8440004'),
    ('Addlestone', '-0.4844009', '51.3730010'),
    ('Adisham', '1.1986994', '51.2413000'),
    ('Adlington Cheshire', '-2.1342010', '53.3198006'),
    ('Adlington Lancashire', '-2.6032005', '53.6131205'),
    ('Adwick', '-1.1798008', '53.5722006'),
    ('Aigburth', '-2.9272000', '53.3648004'),
    ('Ainsdale', '-3.0427000', '53.6021007'),
    ('Ainsdale', '-3.0427000', '53.6021007'),
    ('Aintree', '-2.9562003', '53.4736001'),
    ('Airbles', '-3.9943005', '55.7822001'),
    ('Airdrie', '-3.9813005', '55.8641007'),
    ('Albany Park', '0.1270896', '51.4359004'),
    ('Albrighton', '-2.2690003', '52.6381005'),
    ('Alderley Edge', '-2.2368008', '53.3039009'),
    ('Aldermaston', '-1.1389002', '51.4023006'),
    ('Aldershot', '-0.7597006', '51.2465007'),
    ('Aldrington', '-0.1827001', '50.8379002'),
    ('Alexandra Palace', '-0.1206004', '51.5978004'),
    ('Alexandra Parade', '-4.2108006', '55.8633009'),
    ('Alfreton', '-1.3701010', '53.1009009'),
    ('Allens West', '-1.3616005', '54.5249001'),
    ('Alness', '-4.2494104', '57.6946707'),
    ('Alnmouth', '-1.6365402', '55.3928410'),
    ('Alnmouth', '-1.6365402', '55.3928410'),
    ('Alresford', '0.9965992', '51.8539404'),
    ('Alsager', '-2.2991002', '53.0932004'),
    ('Althorne', '0.7534798', '51.6481209'),
    ('Althorpe', '-0.7331801', '53.5855809'),
    ('Altnabreac', '-3.7054003', '58.3881007'),
    ('Alton', '-0.9668004', '51.1523009'),.......................
    Attached Files Attached Files
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  12. #62
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Holy Shchaboigan!!!

    SB you are some kind of a legend! Seriously, you've become God-like status. Did you end up using the csv file?


    Thanks once more,

  13. #63
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Glad to have helped out, although, I'm just glad to have beaten Cups.

    There are some bright peeps on here, hang around, post some code, there's lots to learn from others alot better than I.

    I just beat them to the punch because, well, if truth be told, I run an excellent department which makes me look good, even whilst I spend my time here on t'internet.

    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  14. #64
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep sounds good. I feel I've already learned so much: better working procedures, breaking up apps that sort of thing.

    Thanks again.


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
  •