[GIS] Alternative overpass api for OpenStreetmap locations query

apiopenstreetmapoverpass-api

Currently i use the overpass api to query for "leisure=playground" ways and nodes to display them on a map in a webapp.

The problem is, first of all its very slow (even with querys limited to a high zoomlevel) and i query dynamically based on the currently displayed map. Which leads sometimes to multiple querys in a short time, when the user drags the map around. This querys often get blocked, because of "too many querys".

The only solution i found so far is: Download the OSM data, filter them locally and upload the filtered data in a DB or to the maptile provider. But to keep the data up to date i would have to do this on a regular basis. This seems to be very inefficient.

Is there any (free or paid) services, which gives fast results on OSM data querys? I wouldnt mind if the data is a few days old, but it should be updated regularly.

Whats the best practice to build some kind of an OSM-Interface for a special type of location?

Update

Example query:

http://overpass-api.de/api/interpreter?data=[out%3Ajson]%3B%0A%28%0A%20%20way%0A%20%20%20%20[%22leisure%22%3D%22playground%22]%0A%20%20%20%20%2840.72781164387366%2C-74.19745445251465%2C40.76032570468407%2C-74.09960746765137%29%3B%0A%29%3B%0Aout%20center%3B

which is

[out:json];
(
  way
    ["leisure"="playground"]
    (40.72781164387366,-74.19745445251465,40.76032570468407,-74.09960746765137);
);
out center;

~3 seconds for 5 ways (directly executed in the browser

It is used in a MeteorJS project. But i don't see any major differences with different frameworks.

Best Answer

taginfo counts 104000 nodes and 206000 ways tagged with leisure=playground. That is not a very huge amount of data, but you should query both data types. It would be best to prefetch them, put them in an extra database, and let the users query that online. You could build centroids on the closed ways to reduce the data amount.

If the data can be "a few days old", you can split the world in three or four parts, prefereably rectangle bounding boxes, and query these with overpass on a weekly scheme.

Or download geofabric extracts of continents, and run an osmfilter query on that.