Jump to content

Online Tool : Import your Airports (47k+)


Asimo
 Share

Recommended Posts

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 : 

 

  1. 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)
  2. Go to "1. Select Airports" bottom tab
    • Select your airport with checkbox
    • Select your Hub (if you want)
  3. Go to "2. Export CSV" tab
    • Check if all is ok
    • Press on the top tab "File" > "Download" > ".csv"
  4. 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 by Asimo
Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ;) 

 

image.png.02ba82e42424f5d7ee90210e5d8ba006.png

 

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,

 

image.png.c16cb4f7bab80069a8feecbb551d1c4f.png

 

Safe flights,

Link to comment
Share on other sites

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 !)

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

Posted (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 by Asimo
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...