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] error in result (cache/overpass...) #13

Closed
sonniki opened this issue Oct 15, 2019 · 4 comments
Closed

[overpass] error in result (cache/overpass...) #13

sonniki opened this issue Oct 15, 2019 · 4 comments

Comments

@sonniki
Copy link

sonniki commented Oct 15, 2019

Hello!

I am trying to query for objects (nodes and ways) that are around some location represented as a (lat, lon) pair.
My query is

query_obj = '(node(around:10000,{0},{1});way(around:10000,{0},{1});); out body;'.format(lat, lon)
overpass.query(query_obj, timeout=5)

And while it works fine with some (lat, lon) pairs, e.g. (52.6851, -0.470191), it throws an exception with others, e.g. (54.59298,-1.48307).

This is what I am getting
image

What could be the reason? And do you have any idea how to avoid that?

Thanks in advance!

@mocnik-science
Copy link
Owner

Dear Sonniki,

This seems to be an error of the Overpass API itself. The query you make is:

[out:json][timeout:25];
(node(around:10000,54.59298,-1.48307);way(around:10000,54.59298,-1.48307);); out body;

If I insert the very same query in Overpass Turbo, I also get an error indicating that the server has some internal processing problems. My advise is to delete the cache object (cache/overpass-e3ddde3e5e1a2...) and run the query again. Another option might be to use a smaller radius, which speeds up the query.

I would be happy if you could indicate whether that solves the issue.

Kind regards

@sonniki
Copy link
Author

sonniki commented Oct 15, 2019

Thank you for your prompt response!

Reducing radius does indeed help but I would like to avoid doing that if it is in any way possible. And I could not locate the cache folder for some reason.
In any case, it does seem like you are right and the problem is that it's too much data for Overpass to handle.
When I split my query in two, one for nodes and one for ways, it works perfectly.

Thank you for your help!

@mocnik-science
Copy link
Owner

That is nice to hear!

Regarding the cache folder: it should be contained in your current working directory.

Regarding the Overpass API: if you have resources to set up your own server, you can do this as well. You could then also use that server together with the OSMPythonTools ...

Have fun with OSMPythonTools!

@mmd-osm
Copy link

mmd-osm commented Jan 1, 2020

You're requesting more than 20MB of data when downloading ALL nodes and ways in a 10km radius. If your download is too slow, you would probably hit the timeout value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants