This is the first field I looked at and it seems that this is only available in the original out of date supplied data from VAM.
For my initial entry for this I set a default of 'airport' which makes some sense. However later on providing i have enough data that matches back to the VAM data I can update this to their values such as 'small_airport' , 'large_airport' etc.
I needed a set of data that was correct with the names of Airports associated with the ICAO code if possible.
It so happens if you are careful you can get a free set of data using an API KEY from a real world website in fact it is ICAO themselves
https://www.icao.int/safety/iStars/Pages/API-Data-Service.aspx
For free you get 100 hits per month so I needed lists of airports that they hold and I managed to get a good set , yes I had to download several CSV files but that was my choice to group countries by letters i.e. A then B etc.
You can do the same with JSON output as well but I need data I can store and look at etc. and CSV is easier for that purpose at present for this project. No doubt some API returns will be JSON or XML and I will deal with them as required to do so
After downloading these 24 files I created a script to build a reference table to help fill in these missing fields.
So now I have another table to use and this is the layout and sample data
LONDON HEATHROW to be London Heathrow
so here is the table
Now I can update the name to the database.
Since elevation is in the ICAO airport table I can now just update the value just like airport name as I calculated the data as feet and not metres.
This one had a bit more work to do as the VAM table uses the 2 character ISO code and the ICAO information table has the 3 character ISO code. Fortunately on the ICAO website there is a download in CSV of all country codes which of course I did and added this to my reference database as well
So that's the Country code sorted out by another ICAO table.
This field was not in the ICAO data I downloaded but is available in another API they have but I think it will take me over my 100 hits for one month, so I will see if other databases and api's have this information as well so for now I default this to 'no city'.
Finally we have the last missing field
This is in the main ICAO table and as such it can be copied to update this field
So now we have nearly a full data table for airports which looks like this now
In theory now this table could be used in VAM but I would like to have data in the two fields I defaulted data into
So next I must try and find this data
Comments
Post a Comment