This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Find all airports between 50 and 100 kms from a location

1

Hi all,

I'm trying to find all airports in radius between 50 and 100 kms from given position. My approach is:

  1. Find all airports in radius 100 kms
  2. "Subtract" all airports in radius 50 kms from result in (1.)

Is this a good way? If not, please, advise me how to do it. If yes, how do I subtract two result sets?

Here is my attempt for airports in 50 km radius from 49.0294417N, 17.4397194E.

Thanks in advance!

asked 03 Jan '18, 13:52

postak420's gravatar image

postak420
31112
accept rate: 0%


One Answer:

2

Here's an example of naming the result sets and finding the difference:

http://overpass-turbo.eu/s/ucd

[out:json];
(node["aeroway"="aerodrome"](around:50000,49.0294417,17.4397194);
)->.fifty;
(node["aeroway"="aerodrome"](around:100000,49.0294417,17.4397194);
)->.hundred;
(.hundred - .fifty);
out;

I think the approach is fine.

answered 03 Jan '18, 21:53

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

1

Thank you. Not sure why I had to modify it to http://overpass-turbo.eu/s/ucs to show me all results.

(03 Jan '18, 22:29) postak420
1

I just omitted ways and relations to save typing for my example.

(04 Jan '18, 01:18) maxerickson

Source code available on GitHub .