4

I'm starting using the Overpass API and I would like to request airports data in some given regions and countries.

So for instance, I've written,

{{geocodeArea:Île-de-France}}->.searchArea;
node["aeroway"="aerodrome"](area.searchArea);
out;

To find all the airports in the Paris region.

Nevertheless, it only returns two very small aerodromes, but not the two main airports.

Is the data incomplete or is my request not properly written ?

  • 5
    You are only searching for nodes. Airports can also be mapped as ways or relations. See OSM elements. – scai Dec 8 '16 at 17:30
4

The best starting point for overpass queries is the Openstreetmap wiki, follow the overpass-turbo link on the left. It generates the following query:

[out:json][timeout:25];
// gather results
(
  // query part for: “aeroway=aerodrome”
  node["aeroway"="aerodrome"]({{bbox}});
  way["aeroway"="aerodrome"]({{bbox}});
  relation["aeroway"="aerodrome"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

You have to move the map to the area of interest, or modify the query like this:

area["name"="Île-de-France"]->.boundaryarea;
(
node(area.boundaryarea)["aeroway"="aerodrome"];
way(area.boundaryarea)["aeroway"="aerodrome"];>;
relation(area.boundaryarea)["aeroway"="aerodrome"];>>;
);
out meta;

You will get 2 relations, 37 ways and 2031 nodes, or in GIS notation 24 polygons, 9 lines and 16 POI.

1

You could try GeoNames API. I use it for a very similar purpose. See the documentation here. Note the documentation on searchLanguage and IATA codes!

Alternatively you could look at OpenFlight database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.