Asimo Posted August 29, 2022 Report Posted August 29, 2022 (edited) Hi everyone ! I created a little google sheets who can help to create a airports.CSV with 47k+ Airports. Datas are from OurAirports and refresh every month. BEFORE TO USE, SELECT ONLY AIRPORTS THAT YOU NEED. A LOT OF AIRPORTS INSIDE YOUR PHPVMS DB CAN CAUSE SOME ISSUES. Easy to use : Access to https://docs.google.com/spreadsheets/d/1qhO6lzIK4gRzRiP--Fp0_Hq7sKVh5aAoK2Nd0aVWYoA/edit#gid=0 You can create a copy if you want (but you'll lose the auto-update) Go to "1. Select Airports" bottom tab Select your airport with checkbox Select your Hub (if you want) Go to "2. Export CSV" tab Check if all is ok Press on the top tab : "File" > "Download" > ".csv" Import in your PHPVMS Notes & Known issues : In notes, you'll have the elevation of the airport. If you want another informations, ask, i can update the script. About timezone, i can admit that's super complicated to find a good dataset with all airport + their timezone. Most airports have all informations but some little like ULM or military base are not. So if your airport have : - no timezone reported, CSV will put "GMT" By default costs are at 0 It's possible that you can have error with +500 airports (google limit) Edited August 29, 2022 by Asimo Quote
Administrators ProAvia Posted August 29, 2022 Administrators Report Posted August 29, 2022 Having 47,000+ airports - most of which you will never fly to - will dramatically slow down your website. It is suggested to add only those airports needed for your schedules. Quote
Asimo Posted August 29, 2022 Author Report Posted August 29, 2022 10 minutes ago, ProAvia said: Having 47,000+ airports - most of which you will never fly to - will dramatically slow down your website. It is suggested to add only those airports needed for your schedules. 47k means just the full possibility to have all airport around the world. The tool really helps you to have a list of airports and select the ones you want. To export them directly in CSV and import in PHPVMS That's why I explain that over 500 can be a problem. Quote
DisposableHero Posted August 29, 2022 Report Posted August 29, 2022 Do you know that phpvms v7 can lookup and add airports automatically when needed ? So, if you still want to have something, either 100 or 47k+, you are free to do so. It is a personal decision after all. But do not complain about errors and/or performance problems later, just a friendly advise. You can call it as "user feedback" if you wish so. Good luck and God speed. Quote
Asimo Posted August 29, 2022 Author Report Posted August 29, 2022 (edited) I added a warning 😅 Edited August 29, 2022 by Asimo 1 Quote
DisposableHero Posted August 29, 2022 Report Posted August 29, 2022 There are small issues in the export (and in the spreadsheet), just a typo about html tags you are using. 1. This is important; phpvms v7 needs the countries with ISO two letter codes, not with full names. Even though it is still possible to import, sending in "United States" will brake a lot of things. It should be "US" instead of "United States Of America", or "TR" instead of "Türkiye" etc. 2. This is something tiny compared to country names. <p> Altitude: .... ft <p> is wrong, it should end with a closure like "<p> Altitude: ... ft </p>" And additionally you can just skip that paragraph tag, just fill in simple text like "Altitude: .... ft" Either way, putting them in quotes like "Altitude: ...ft" will be much safer for the importer 'cause it will forcefully understand that we are sending in a string. Also I am sending in an update to let IATA codes be empty, so you do not need to add "-" for them Another question, why GMT ? I mean you already have the time zone for some of them... If possible forcing them to a same time zone looks more logical to me, I know there may be differences in countries but I do not think a country will have both Africa/Luanda and GMT at the same time It will be wrong, or it has a risk to be wrong but at least a more acceptable error in my eyes. GMT will be really different. --- Testing after core changes for no IATA code; FNCC,,Cacolo Airport,Cacolo,AO,Africa/Luanda,0,-10.110278,19.287304,0,0,0,0, Safe flights, Quote
Asimo Posted August 29, 2022 Author Report Posted August 29, 2022 23 minutes ago, DisposableHero said: 1. This is important; phpvms v7 needs the countries with ISO two letter codes, not with full names. Even though it is still possible to import, sending in "United States" will brake a lot of things. It should be "US" instead of "United States Of America", or "TR" instead of "Türkiye" etc. That fixed, didn't think that phpvms worked like that 24 minutes ago, DisposableHero said: And additionally you can just skip that paragraph tag, just fill in simple text like That fixed too 25 minutes ago, DisposableHero said: Also I am sending in an update to let IATA codes be empty, so you do not need to add "-" for them When i see that the push is on master and live, i'll edit this "-" to null 26 minutes ago, DisposableHero said: Another question, why GMT ? I mean you already have the time zone for some of them... If possible forcing them to a same time zone looks more logical to me, I know there may be differences in countries but I do not think a country will have both Africa/Luanda and GMT at the same time It will be wrong, or it has a risk to be wrong but at least a more acceptable error in my eyes. GMT will be really different. So, it's my next job, timezones are pretty complicated to obtain by airport, you've some countries who use multi-timezones, and need to check all of that. I'll inject new datas during the next weeks. Thanks !) Quote
DisposableHero Posted August 29, 2022 Report Posted August 29, 2022 Yeah that time zone thing is tricky, I can feel the pain there... But looking your exporter, honestly it would be much greater with it Maybe a master table for countries, codes and time zones... Then a lookup in spreadsheet if possible, at least when there is no info use the country time zone instead of GMT, something like that. https://github.com/nabeelio/phpvms/pull/1481 Importer update PR is in, just waits big boss (Nabeel) to check and merge. After all, your tool is nice (specially with that warnings and limitations per file) for beginners and people who have no access to official data. I still advise people to be careful though, not specific to your work but for all imports Safe flights 1 Quote
Asimo Posted August 29, 2022 Author Report Posted August 29, 2022 Iata is fixed. Null is apply by default. 1 Quote
Asimo Posted August 30, 2022 Author Report Posted August 30, 2022 (edited) 13 hours ago, DisposableHero said: Yeah that time zone thing is tricky, I can feel the pain there... But looking your exporter, honestly it would be much greater with it Maybe a master table for countries, codes and time zones... Then a lookup in spreadsheet if possible, at least when there is no info use the country time zone instead of GMT, something like that. I just updated with full world timezone. Maybe some errors in Argentina, Brazil, USA because multi timezones 😄 Edited August 30, 2022 by Asimo 1 Quote
camilovelandia04 Posted October 30, 2022 Report Posted October 30, 2022 Hi there! I was trying to use your tool to import some airports to our database but the spreadsheet has an error in page 2, appreciate if you check it. thanks a lot Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.