Re: [Talk-GB] pub defined as a relation

2017-10-25 Thread Philip Barnes
Certainly possible as we move to putting the tags on the outline instead of the 
building. It is not unusual to have the car park or garden area separated by a 
road.

Phil (trigpoint) 

On 24 October 2017 17:35:01 BST, Jez Nicholson  wrote:
>Just preparing an Overpass query for the OSM workshop I am running in
>Brighton. Naturally I queried pubsthen wondered whether I need
>bother
>with relationsand found
>http://www.openstreetmap.org/relation/3216899
>
>Seems a bit of a sledgehammer to crack a nut.
>
>While i'm here, can anyone tell me why http://overpass-turbo.eu/s/szG
>does
>not return nodes and ways-and-their-nodes? It is very similar to the
>example
>
>area[name="Brighton and Hove"][admin_level=6];
>(
>  node(area)[amenity=pub];
>  way(area)[amenity=pub];
>);
>(._;>;);
>out body;
>
>- Jez

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb


Re: [Talk-GB] pub defined as a relation

2017-10-25 Thread Roland Olbricht
While i'm here, can anyone tell me why 
http://overpass-turbo.eu/s/szG does not return nodes and 
ways-and-their-nodes? It is very similar to the example


Thank you for asking. As I will explain below, this is an opportunity to 
improve the documentation.



area[name="Brighton and Hove"][admin_level=6];
(
   node(area)[amenity=pub];
   way(area)[amenity=pub];
);
(._;>;);
out body;


In line 3 we have only nodes as a result. In line 4, we ask for ways 
that are inside the areas from the previous result (the one from line 
3). Thus, line 4 can never have a result.


Hence, please change it to

area[name="Brighton and Hove"][admin_level=6]->.a;
(
   node(area.a)[amenity=pub];
   way(area.a)[amenity=pub];
);
(._;>;);
out body;

This way, we store the result of line 1 in a set named "a". And in lines 
3 and 4 we now ask for nodes resp. ways that are in areas from "a". "a" 
could be an arbitrary name (composed of letters, digits, and 
underscores, starting with a letter; names are case sesitive).


By the way, I suggest to replace lines 5 and 6:

area[name="Brighton and Hove"][admin_level=6]->.a;
(
   node(area.a)[amenity=pub];
   way(area.a)[amenity=pub];
);
out center;

This makes both nodes and ways into a point with a single location. For 
the purpose of viewing the objects in Overpass Turbo, this means you 
need to transfer and process fewer data.


I thought there were an explanation at
http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_API_by_Example
but it isn't. I will add the example and the explanation there.

For the question whether it was different before: No. I am a strong 
proponent of backwards compatibility. It will rarely or never happen 
that I change existing language semantics.


- Roland

___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb


Re: [Talk-GB] pub defined as a relation

2017-10-24 Thread Dave F

Oh Dear.
I've always been hesitant to call out specific contributors by name, but 
user 'mentor' has been a repeated thorn in my side whenever he's (male?) 
'contributed' in my locale. Those edits can, at best, be described 
'assumptive' (either that, or he's widely travelled within the UK, 
whilst blindfolded).


For this specific example: From aerial images, I would tag the whole 
area, including rear patio area/car parking as amenity=pub, name=* etc & 
combine the full extent of the building as building=pub. Both relations 
appear unnecessary.


Additionally the residential area could be tweaked around the shops/pub 
& landuse=retail be added.


Your 2nd point:
Coincidentally I've just noticed that it only returns the first option 
(swap nodes with ways to see). I'm unclear if it's by design or a recent 
update error. I'd be interested to know the answer.


Try:

{{geocodeArea: Brighton and Hove}}->.searchArea;
(
node["amenity"="pub"](area.searchArea);
way["amenity"="pub"](area.searchArea);
relation["amenity"="pub"](area.searchArea);
);
(._;>;);
out body;

DaveF


On 24/10/2017 17:35, Jez Nicholson wrote:
Just preparing an Overpass query for the OSM workshop I am running in 
Brighton. Naturally I queried pubsthen wondered whether I need 
bother with relationsand found 
http://www.openstreetmap.org/relation/3216899


Seems a bit of a sledgehammer to crack a nut.

While i'm here, can anyone tell me why 
http://overpass-turbo.eu/s/szG does not return nodes and 
ways-and-their-nodes? It is very similar to the example


area[name="Brighton and Hove"][admin_level=6];
(
  node(area)[amenity=pub];
  way(area)[amenity=pub];
);
(._;>;);
out body;

- Jez


___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb


[Talk-GB] pub defined as a relation

2017-10-24 Thread Jez Nicholson
Just preparing an Overpass query for the OSM workshop I am running in
Brighton. Naturally I queried pubsthen wondered whether I need bother
with relationsand found http://www.openstreetmap.org/relation/3216899

Seems a bit of a sledgehammer to crack a nut.

While i'm here, can anyone tell me why http://overpass-turbo.eu/s/szG does
not return nodes and ways-and-their-nodes? It is very similar to the
example

area[name="Brighton and Hove"][admin_level=6];
(
  node(area)[amenity=pub];
  way(area)[amenity=pub];
);
(._;>;);
out body;

- Jez
___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb