Talk:Overpass turbo/Wizard

From OpenStreetMap Wiki
Jump to navigation Jump to search

Dead link

Link in "The wizard defines its own grammar" is dead and I was unable to fix it Mateusz Konieczny (talk) 21:33, 21 June 2018 (UTC)

this is fixed. The repository is the same (from sam author) but the script has moved in the project, and the PEG.js project itself also has a new home (and is maintained by another person: look at the history displayed where the original author is granted). — Verdy_p (talk) 22:23, 21 June 2018 (UTC)
Thanks! Mateusz Konieczny (talk) 17:29, 22 June 2018 (UTC)

Boolean operators

The natural language explanation in the operators table appears to be identical for AND and OR. In any case, it doesn't make easy reading in English and I can't make sense of it. Can anyone good at Boolean operators clarify things? eteb3 (talk) 10:00, 19 October 2019 (UTC)

Oops, these descriptions indeed didn't make any sense. This was probably some copy/paste mistake. Thanks for letting me know. It should be fixed now. -- Tyr (talk) 11:46, 25 October 2019 (UTC)

Meta Data Filters: ISO time strings

Can the time string be of the simpler sort, 2019-10-23 for example? eteb3 (talk) 19:28, 23 October 2019 (UTC)

In this case, the date string is just plainly inserted into the Overpass QL query. So this question should be better asked on Overpass_QL and/or on github. -- Tyr (talk) 11:42, 25 October 2019 (UTC)

Could you clarify "just plainly inserted"? Also I feel that as the Wizard is designed for beginners (among other people) somewhere there needs to be a clear disambiguation of Overpass Turbo/Overpass QL/Overpass API for people who are completely new to databases. I thought that would be here, as this is the page linked to from the wizard help link. eteb3 (talk) 18:14, 25 October 2019 (UTC)

I think you're right. The best solution for beginners would be that the wizard would "complete" the partial date/time string so it can be consumed properly by the overpass api. I'll see what can be done. -- Tyr (talk) 13:38, 29 October 2019 (UTC)

Had a go here: Overpass. Thoughts & corrections welcome. eteb3 (talk) 13:25, 27 October 2019 (UTC)

Thanks. Looks like a good start. -- Tyr (talk) 13:38, 29 October 2019 (UTC)

Multiple operators?

Why are there multiple entries in the 'operator' column, some of them in small type? eteb3 (talk) 09:53, 24 October 2019 (UTC)

These are alternative variants to get the same result. e.g. instead of writing highway=* and maxspeed=50 one can also write highway=* && maxspeed=50. -- Tyr (talk) 11:36, 25 October 2019 (UTC)

Thanks. Have added a line to the table titles to indicate this. Revert if not clear. eteb3 (talk) 18:10, 25 October 2019 (UTC)

More queries from a database newbie

Tag operators

The page refers to "the well known regex notation". I'm not sure it is, unless you already know what a regex is :) Is there documentation somewhere that we could be referred to?

Generally, all of the below is baffling to me:

Regular expressions can be provided either as plain strings or with the well known regex notation:
ref ~ "[0-9]+"
name ~ /street$/i (the modifier i makes the match case-insensitive)

Is one of those two examples a plain string and one 'the well known notation'?

True, what was meant was the "well" known perl notation/syntax with slashes as delimiters. I've clarified it in the sentence now.
The first example is the "plain string" variant (matching all tags with at least one number in the ref=* tag), the second one is showing the regular expression with slashes as delimiters and a modifier that makes the query case-insensitive (matching everything that has a name which ends in "street" or "Street" or …).
-- Tyr (talk) 10:51, 4 November 2019 (UTC)

You can use wildcards

Could the syntax of the example query be unpacked? The relationship between name~"^DB0.*" and the natural language text "callsigns all start with DB0* examples: DB0XS, DB0SR" is not clear. Does the ^ indicate the string must be all caps? What does the . do?

Thanks :) eteb3 (talk) 20:50, 30 October 2019 (UTC)

I don't like this section very much, as it is now: It just repeats features that were already explained above, and only provides a very specific, niche example (not many people will know about and search ham-radio objects on OSM). Also, the stroke out sentence should also not be there anymore.
All in all, I think that the section as it is now is just confusing.
I would rather remove the section and mention in the tag searches section that the operators : and ~ can be used to perform wildcard searches. Does that sound ok?

Sounds great! Thank you. Even better if there are a couple of worked examples. eteb3 (talk)

PS: the ^ means that the string needs to match the following regular expression in order to match (e.g. "DB0XS" would match, but "A1DB0" would not). the .* part matches anything. Here in this example, strictly speaking, it doesn't have any effect and is thus not really necessary. It was probably used to indicate explicitly that after the "DB0" part there are still more characters expected in the queried strings. A more reasonable example involving .* would probably be something like: ^Queen.*Road$ which matches anything that starts with "Queen", and ends with "Road", having any number of arbitrary characters in between.
Regular expressions can be very useful in lots of different applications (also outside database applications). You might want to learn more about it :)
-- Tyr (talk) 10:51, 4 November 2019 (UTC)

Relation queries

I am in a bit of a hurry now, but how do I return ways that are members of a given type of relation in a region, such as a administrative boundary? I want to export them as ways instead of shapes. --ika-chan! (talk) 13:31, 11 June 2020 (UTC)

Check the wiki at Overpass_API/Overpass_QL? eteb3 (talk) 08:29, 2 October 2020 (UTC)

Combining search terms

This page is a good list of terms that can be used in the queries.

It doesn't say how the query is composed - I think I mean the syntax of the query that you would type into the box at Overpass turbo. Eg, I want to find all ways [waterway=floating_barrier] AND created by [someuser].

The search and filter terms I need are both clear, but it doesn't tell me how to combine them. Could someone put some worked examples in the wiki page to help newbies like me? eteb3 (talk) 08:33, 2 October 2020 (UTC)

Discuss output

Mention how to print a list of what it found. Jidanni (talk) 15:59, 29 September 2022 (UTC)

Oh, one must push the Export button. Jidanni (talk) 16:05, 29 September 2022 (UTC)