I have to find some types of POIs around a given coordinates. Ideally, I want to find the nearest one of such POI around the given coordinates.
To meet my requirement I can search with either around
[out:json];
(
node["public_transport"="platform"](around:500,48.2,16.3);
);
out body center qt;
>;
out skel qt;
or approximately with bbox
[out:json][bbox:48.19,16.29,48.21,16.31];
(
node["public_transport"="platform"];
);
out body center qt;
>;
out skel qt;
My strategy to search quickly is to start search in a small area (short distance or smaller bbox), if I could not find anything then I will increase the search area. I search incrementally until something is found or a hard distance limit is reached.
I am not sure if Overpass-API implementation has done some performance tricks like cache of previous result.
Every time I increase search area I still search the previous smaller area. With bbox
I can somehow split it and avoid already searched area, but I do not know I can achieve it with around
.
How can I use around
method to increase search area without covering old searched one?
update: to focus on search procedure itself. I will ignore the rate/resource limiting, latency, and so on, since I can eventually run my own instance instead of querying public one. I could perform queries in parallel or do some load balance among instance but it is just further optimisation options.
around
question. The overall system or application performance is not my main point.