I have a local database of airports, runways, navaids, and fixes that I would like to keep in sync. I have initially populated tables with this data from CSV files and now I want to check if there are any new objects or if any of them have been updated. It looks like this is a description of the airport interface but I don't know how to get the data I need. I was able to run a query and get this for output https://services6.arcgis.com/ssFJjBXIUyZDrSYZ/arcgis/rest/services/US_Airport/FeatureServer/0/query?... and saved it as a file but it would not import as a database table. It looks like there is a section at the beginning that describes the data fields and what type they are. The fields I need are airport identifier (ex: clt), elevation, longitude and latitude degrees, minutes and seconds.
Maybe I am not even looking in the right place. If so, I would appreciate some direction and maybe sample code.
Hi @JAARSSoftwareDevelopment ,
You are right, the "fields" property describes the columns of that table, apparently there is no "clt" field:
You can also check the layer description like this: https://services6.arcgis.com/ssFJjBXIUyZDrSYZ/arcgis/rest/services/US_Airport/FeatureServer/0?f=json
This is how it looks:
The first image is the response in .../FeatureServer/0/query?.... The second one is from .../FeatureServer/0?f=json.
As you can see in the developer site, the "type" field can be:
esriFieldTypeBlob | esriFieldTypeDate | esriFieldTypeDouble | esriFieldTypeGeometry | esriFieldTypeGlobalID | esriFieldTypeGUID | esriFieldTypeInteger | esriFieldTypeOID | esriFieldTypeRaster | esriFieldTypeSingle | esriFieldTypeSmallInteger | esriFieldTypeString | esriFieldTypeXML.
Where: OID = Object ID; GUID = Global Unique IDentifier, ... more about ArcGIS field data types.
Related to this comment:
I want to check if there are any new objects or if any of them have been updated
You have two options:
I hope this helps.
Raul,
Thanks so much for taking the time to reply. After a lot of research it looks like the data I want like airport, runways, navaids and fixes are hosted on arcgis by the FAA. I do not plan on hosting anything there but want to pull down the data. Do you know how I could find out if there are webhooks for these?
The solution I am thinking of is a lot more work than a webhook. I will loop through my list of airports in the database and call the URL that returns JSON to get a list of airports. I will then compare this list with my database list and archive any that are no longer in the list and add any that are new. The problem I see is the URL has a limit of 1000 and the list of airports is 13260. I will go through the airports that start with a and keep calling the URL. If there is an easier way I would love to hear it.