Re: [Talk-GB] overpass query involving pubs

2017-10-25 Thread Andrew Black
I am confused by this.
I understood ( x; y; ); to be the union of x and y.  Rather than x passing
its results onto y. What am i missing.


On 25 Oct 2017 11:58, "Roland Olbricht"  wrote:

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
___
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 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


[Talk-GB] fixme:addr* tags from FHRS comparison tool

2017-10-25 Thread Gregrs

Dear all,

The FHRS comparison tool (http://gregrs.dev.openstreetmap.org/fhrs/) 
adds fixme:addr1, fixme:addr2, etc. tags when a user clicks 'Add tags in 
JOSM' because it can't (yet?) figure out which parts of the address 
should go into which addr: tag. The idea is that mappers should make 
this decision and copy the relevant part of each address into 
addr:housenumber, addr:street, addr:city, etc. However, it's easy to 
forget to do this occasionally.


If you think you might have forgotten to change some fixme:addr tags or 
if you are adding addresses for the Quarterly Project, I would encourage 
you to look out for these tags and fix them where possible. It's easy to 
find them using the new Overpass Turbo download function in JOSM; simply 
enter the following into the Query Wizard:


"fixme:addr1"=* or "fixme:addr2"=* or "fixme:addr3"=* or "fixme:addr4"=*

You can then use a filter to remove any nodes/ways that you have already 
fixed using the following pattern:


"fixme:addr2" OR "fixme:addr1" OR "fixme:addr3" OR "fixme:addr4"

Thanks,
Greg

--
Twitter: @gregrs_uk
http://gregrs.dev.openstreetmap.org
PGP key ID: 64907C8A
Fingerprint: EBD1 077F CCDD 841E A505 3FAA D2E8 592E 6490 7C8A



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