AD4GD / pilot-2

2 stars 1 forks source link

Overpass Turbo API - connection closed #3

Open vwvbrand opened 5 days ago

vwvbrand commented 5 days ago

Overpass Turbo API closed connection while trying to query water bodies for the bounding box which covers Catalonia. The following query was used:

[out:json]
[maxsize:1073741824]
[timeout:15000]
[date:"{year}-12-31T23:59:59Z"]
[bbox:{bbox}];
(
nwr["natural"="water"];
nwr["water"~"^(cenote|lagoon|lake|oxbow|rapids|river|
stream|stream_pool|canal|harbour|pond|reservoir|
wastewater|tidal|natural)$"];
nwr["landuse"="reservoir"];
nwr["waterway"="riverbank"];
/*UPD-second filter was added to catch other water features at all timestamps*/
/*UPD-third and fourth filters were added to catch other water features at older timestamps*/
/*it is more reliable to query nodes, ways and relations altogether ('nwr') to fetch the complete polygon spatial features*/
);
(._;>;);
out;
"""

Bounding box used: 40.24452664923259,-0.17175642211838113,43.146655333714754,3.6946497219995114

The explicit issue log is attached. waterbodies_query_log.txt

All previous queries to fetch roads, railways and water lines were successful. Attempt to increase the timeout parameter twice brought the same error.

vwvbrand commented 3 days ago

UPD on 17/10/2024: this query was successful without any changes in query, so it doesn't provide a reliable solution.

There is no unique rule on the timeout limit for each query:

These resource limits cannot be set to arbitrary high values: each Overpass API instance may refuse to extend them above some threshold (depending on server capabilities or current server load), or the query may just fail with an error message (and non-OK HTTP server error status).

https://wiki.openstreetmap.org/wiki/Overpass_API#Resource_management_options_(osm-script)

Possible solutions: