Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overpass Turbo API - connection closed #3

Open
vwvbrand opened this issue Oct 15, 2024 · 1 comment
Open

Overpass Turbo API - connection closed #3

vwvbrand opened this issue Oct 15, 2024 · 1 comment
Assignees
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@vwvbrand
Copy link
Contributor

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
Copy link
Contributor Author

vwvbrand commented Oct 17, 2024

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:

  • go through a multiple options of [timeout] parameter
  • test out ohsome API instead of Overpass Turbo API
  • find out if any other Overpass API instances are more reliable
    Creation of own Overpass instance is not possible (see here).

@vwvbrand vwvbrand added bug Something isn't working invalid This doesn't seem right labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants