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

Overpass API : around query very slow

0

I want to find all the communes in a "Département" and around 10 kilometers of the limit of this département. rel[name="Ille-et-Vilaine"][boundary=administrative];rel(around:10000)['admin_level'='8'];out meta;

The request is very very slow

asked 06 Dec '14, 12:45

mga_geo's gravatar image

mga_geo
1111
accept rate: 0%


One Answer:

5

No surprise here. This kind of query is known to be slow. Moreover, the way you constructed the query would even return incorrect results, as you wouldn't get all communities in your department (only those up to 10km proximity to the border).

Note: I had to remove most parts of my previous answer, as it didn't properly take the 10km distance into account. Sorry for that.

I've submitted a pull request to improve the runtime of your query. Once that fix is in place, your query will run in about 2 minutes with the following result:

alt text

Link to previous (non-working) overpass turbo query: http://overpass-turbo.eu/s/6oX

answered 06 Dec '14, 13:22

mmd's gravatar image

mmd
5.7k15388
accept rate: 37%

edited 28 Dec '14, 15:30

Pull request for faster around statement can now be tested on the dev instance: http://overpass-turbo.eu/s/a6n

This query might take up to 2 minutes and returns about 30MB of data. Results should look pretty much like on the screenshot above.

(24 Jun '15, 21:20) mmd

Source code available on GitHub .