~siiky/public

1

Additional Overpass information

Details
Message ID
<06cee7bd-460c-4a7f-a86d-693d4d8747f6@disroot.org>
DKIM signature
pass
Download raw message
Some more queries with nice explanations:
https://wiki.openstreetmap.org/wiki/User:CitySketcher#Overpass_queries

> nwr["amenity"="library"](area:3600295480);
out body;
> // Or:
> area(3600295480)->.searchArea;
(nwr["amenity"="library"](area.searchArea););
> out body;
> >;
> out skel qt;

These are the same as each other. You will likely prefer `out geom;` at 
the end of your queries; it outputs all the information you'll need, and 
is more consise than the `out body; >; out skel qt;` that's generated by 
Overpass Turbo's default settings. They are completely the same as each 
other. `out geom;` gives the objects' tags and geometry in one step and 
is faster to type. `out body; >; out skel qt;` gives the objects' tags, 
then ""recurses down"" (i.e. looks up the underlying nodes that make up 
each way, since ways technically don't have geometry of their own), then 
gives geometry for those nodes in a second step. Further reading: 
https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_API_by_Example
ctrl+f "nowadays"

> but the latter is supposed to be more correct.

Whoever told you that is probably wrong. They're really the same.

Myself, and CitySketcher on the wiki, are both pretty experienced with 
the Overpass API, so feel free to get in touch with either one of us if 
you need more help writing or understanding queries :)

You can update your page on gemini with this info if you want to.

Cadence
Details
Message ID
<dcea1c62-941e-4cf4-b2e7-11efd8186223@disroot.org>
In-Reply-To
<06cee7bd-460c-4a7f-a86d-693d4d8747f6@disroot.org> (view parent)
DKIM signature
pass
Download raw message
29 Dec 2022 01:01:01 Cadence Ember <cadence@disroot.org>:

> Some more queries with nice explanations:
> https://wiki.openstreetmap.org/wiki/User:CitySketcher#Overpass_queries
>
>> nwr["amenity"="library"](area:3600295480);
> out body;
>> // Or:
>> area(3600295480)->.searchArea;
> (nwr["amenity"="library"](area.searchArea););
>> out body;
>>> ;
>> out skel qt;
>
> These are the same as each other. You will likely prefer `out geom;` at 
> the end of your queries; it outputs all the information you'll need, 
> and is more consise than the `out body; >; out skel qt;` that's 
> generated by Overpass Turbo's default settings. They are completely the 
> same as each other. `out geom;` gives the objects' tags and geometry in 
> one step and is faster to type. `out body; >; out skel qt;` gives the 
> objects' tags, then ""recurses down"" (i.e. looks up the underlying 
> nodes that make up each way, since ways technically don't have geometry 
> of their own), then gives geometry for those nodes in a second step. 
> Further reading: 
> https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_API_by_Example
> ctrl+f "nowadays"
>
>> but the latter is supposed to be more correct.
>
> Whoever told you that is probably wrong. They're really the same.
>
> Myself, and CitySketcher on the wiki, are both pretty experienced with 
> the Overpass API, so feel free to get in touch with either one of us if 
> you need more help writing or understanding queries :)
>
> You can update your page on gemini with this info if you want to.
>
> Cadence
Also, the Overpass Blog has so much neat hidden information! 
https://dev.overpass-api.de/blog/index.html

Stack Overflow is pretty sparse for Overpass, so I prefer to read the 
published manuals and guides and blogs for help rather than 
searching/asking on SO. This approach means I also learn things that I 
end up needing later on, rather than merely answering a specific 
question.

Trial and error is your friend. Breaking complex queries (>10 lines of 
code) into smaller ones is your friend.

Cadence
Reply to thread Export thread (mbox)