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

Missing recently edited ways in results #33

Closed
masfaraud opened this issue Dec 26, 2020 · 4 comments
Closed

Missing recently edited ways in results #33

masfaraud opened this issue Dec 26, 2020 · 4 comments

Comments

@masfaraud
Copy link

Doing:

query = overpassQueryBuilder(area=3600007407, elementType='way',    selector='"railway"="rail"', out='body')
a=overpass.query(query)

len(a.ways())
Out[30]: 751

len(a.elements())
Out[28]: 751

but doing on http://overpass-api.de/query_form.html way(area:3600007407)[railway=rail]; out count;

<count id="0">
    <tag k="nodes" v="0"/>
    <tag k="ways" v="764"/>
    <tag k="relations" v="0"/>
    <tag k="areas" v="0"/>
    <tag k="total" v="764"/>
  </count>

overpy also gives 764 elements.

It seems that missing ways were recently modified like 852538015: https://www.openstreetmap.org/way/852538015 edited 3 month ago

Do you have any idea ?

@masfaraud
Copy link
Author

Making the query without double quotes works.

query = overpassQueryBuilder(area=3600007407, elementType='way',    selector='railway=rail', out='body')

@mocnik-science
Copy link
Owner

mocnik-science commented Jan 19, 2021

Yes, feel free to provide it without double quotes. This syntax is defined by the Overpass language. The overpassQueryBuilder actually assembles a command in the Overpass language, which is then submitted to the Overpass server. The Overpass language seems to specify that tags can be provided without double quotes. If you think this issue is solved, feel free to close it. Thanks!

@masfaraud
Copy link
Author

Yes, but maybe the doc needs an update because it was adapted from a copy/paste from doc

@mocnik-science
Copy link
Owner

Dear @masfaraud,

The Overpass language seems to allow selectors to be specified with and without quotation marks. I have tested your example again, and it returns the same number of elements independent of whether quotation marks are used or not.

Also, I tried to find where the documentation is wrong. I could not find what you are referring to. Yes, I use quotation marks in the documentation, because this seems to make it easier to understand and is in line with most examples of the Overpass language documentation. In case, there should be some error or ambiguous part in in the documentation, please let me know. I would appreciate if you could name the filename and the line of the part in question, because this makes it easier for me to identify the issue.

Thanks again for your comments here.

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

2 participants