<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 2015-02-02 22:24, Julien Minet wrote
:<br>
</div>
<blockquote
cite="mid:2069556153.1279027.1422912273859.JavaMail.yahoo@mail.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff;
font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
Lucida Grande, sans-serif;font-size:16px">
<div id="yui_3_16_0_1_1422911938204_3440" dir="ltr">OK, I
thought about that but I don't know how to combine this with
the tag "name"? </div>
<div id="yui_3_16_0_1_1422911938204_3440" dir="ltr"><br>
</div>
<div id="yui_3_16_0_1_1422911938204_3440" dir="ltr">Also, I
wonder if there are a way to search by the id of the OSM
object. For instance, how to search for a specific
town/village if there are several places with the same name,
which is widespread in the world. <br>
</div>
</div>
</blockquote>
Anding two conditions is chaining two filters.<br>
That is, the output of the first filter is given as input to the
second filter which discards what doesn't match its condition.<br>
That comes down to a AND operation which, unfortunately, is not as
explicitly and as clearly explained as OR which is the union. But
hold on and read examples. For overpass is one of the rare things
that are not fuzzy, just the explanation is, a bit in places ;-)<br>
<br>
Creating overpass objects (a set) from plain OSM elements <a
href="http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#By_element_id.">identified
by ID is explained here</a>.<br>
<br>
For overpass, an area is an object type of its own, in addition to
node, way and relation.<br>
It has an ID of its own too and I myself wondered before how to find
it.<br>
But there's now an experimental way to <a
href="http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Map_way.2Frelation_to_area_.28map_to_area.29">convert
a relation ID to area ID</a>.<br>
<br>
<table>
<tbody>
<tr>
<td>André.</td>
</tr>
</tbody>
</table>
<br>
<blockquote
cite="mid:2069556153.1279027.1422912273859.JavaMail.yahoo@mail.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff;
font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
Lucida Grande, sans-serif;font-size:16px">
<div id="yui_3_16_0_1_1422911938204_3440" dir="ltr"><br>
</div>
<div id="yui_3_16_0_1_1422911938204_3440" dir="ltr">Julien</div>
<br>
<div style="font-family: HelveticaNeue, Helvetica Neue,
Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"
id="yui_3_16_0_1_1422911938204_3458">
<div style="font-family: HelveticaNeue, Helvetica Neue,
Helvetica, Arial, Lucida Grande, sans-serif; font-size:
16px;" id="yui_3_16_0_1_1422911938204_3457">
<div dir="ltr" id="yui_3_16_0_1_1422911938204_3456">
<hr id="yui_3_16_0_1_1422911938204_3455" size="1"> <font
id="yui_3_16_0_1_1422911938204_3509" size="2"
face="Arial"> <b><span style="font-weight:bold;">De :</span></b>
Sander Deryckere <a class="moz-txt-link-rfc2396E" href="mailto:sanderd17@gmail.com"><sanderd17@gmail.com></a><br>
<b><span style="font-weight: bold;">À :</span></b>
Julien Minet <a class="moz-txt-link-rfc2396E" href="mailto:julien_wa@yahoo.fr"><julien_wa@yahoo.fr></a>; OpenStreetMap
Belgium <a class="moz-txt-link-rfc2396E" href="mailto:talk-be@openstreetmap.org"><talk-be@openstreetmap.org></a> <br>
<b><span style="font-weight: bold;">Envoyé le :</span></b>
Lundi 2 février 2015 16h16<br>
<b><span style="font-weight: bold;">Objet :</span></b>
Re: [OSM-talk-be] Overpass-turbo issue with Luxembourg<br>
</font> </div>
<div class="y_msg_container"
id="yui_3_16_0_1_1422911938204_3510"><br>
<div id="yiv0851718814">
<div id="yui_3_16_0_1_1422911938204_3515">
<div dir="ltr" id="yui_3_16_0_1_1422911938204_3514">
<div id="yui_3_16_0_1_1422911938204_3513">
<div id="yui_3_16_0_1_1422911938204_3512">
<div id="yui_3_16_0_1_1422911938204_3511">You
should include the correct admin_level in the
query<br clear="none">
<br clear="none">
</div>
A region has an admin_level=4, a province has
admin_level=6, an arrondissement has
admin_level=7, a municipality has an
admin_level=8, a part-municipality or city
district has admin_level=9 (note that
part-municipalities aren't mapped everywhere,
since there's no current data about it).<br
clear="none">
<br clear="none">
</div>
I know it can be confusing with provinces and
cities having the same name (it happens even more
often with arrondissements and cities), but this
is about the only solution (else you start losing
a lot of rendering space, or have to add a
bazilllion of other tags for all different
languages).<br clear="none">
<br clear="none">
</div>
Regards,<br clear="none">
Sander<br clear="none">
</div>
<div class="yiv0851718814gmail_extra"
id="yui_3_16_0_1_1422911938204_3516"><br
clear="none">
<div class="yiv0851718814gmail_quote"
id="yui_3_16_0_1_1422911938204_3517">2015-02-02
16:04 GMT+01:00 Julien Minet <span dir="ltr"><<a
moz-do-not-send="true" rel="nofollow"
shape="rect"
ymailto="mailto:julien_wa@yahoo.fr"
target="_blank"
href="mailto:julien_wa@yahoo.fr">julien_wa@yahoo.fr</a>></span>:<br
clear="none">
<blockquote class="yiv0851718814gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex;"
id="yui_3_16_0_1_1422911938204_3521">
<div class="qtdSeparateBR"><br>
<br>
</div>
<div class="yiv0851718814yqt8920405446"
id="yiv0851718814yqt78922">
<div id="yui_3_16_0_1_1422911938204_3520">
<div
style="color:#000;background-color:#fff;font-family:HelveticaNeue,
Helvetica Neue, Helvetica, Arial, Lucida
Grande, sans-serif;font-size:16px;"
id="yui_3_16_0_1_1422911938204_3519">
<div dir="ltr"
id="yui_3_16_0_1_1422911938204_3518">Hi,
<br clear="none">
</div>
<div dir="ltr"
id="yui_3_16_0_1_1422911938204_3522"><br
clear="none">
</div>
<div dir="ltr"
id="yui_3_16_0_1_1422911938204_3523">I
have an issue with overpass-turbo and
maybe someone could help me. I want to
make a query over the "<b>Province</b>
de Luxembourg" in Belgium, but I cannot
separate with results from the <b>country</b>
of Luxembourg, since they have the same
name:</div>
<div dir="ltr"
id="yui_3_16_0_1_1422911938204_3524"><br
clear="none">
</div>
<div dir="ltr"
id="yui_3_16_0_1_1422911938204_3525">Example:
<br clear="none">
</div>
<div dir="ltr"
id="yui_3_16_0_1_1422911938204_3526"><br
clear="none">
</div>
<div dir="ltr"
id="yui_3_16_0_1_1422911938204_3527">[out:json][timeout:25];<br
clear="none">
// fetch area “Luxembourg” to search in<br
clear="none">
area['name:fr'='Luxembourg']->.searchArea;<br clear="none">
// gather results<br clear="none">
(<br clear="none">
// query part for: “Shop”<br
clear="none">
node["shop"](area.searchArea);<br
clear="none">
way["shop"](area.searchArea);<br
clear="none">
relation["shop"](area.searchArea);<br
clear="none">
);<br clear="none">
// print results<br clear="none">
out geom;<br clear="none">
>;</div>
<div dir="ltr"><br clear="none">
</div>
<div dir="ltr">An idea would be to use
another tag than the name, such as a OSM
id for each object, or another unique
tag. I tried, but I could not succeed.
Also, if you want to make a search over
'Namur', you have the data of the whole
province of Namur, and not the city. <br
clear="none">
</div>
<div dir="ltr"><br clear="none">
</div>
<div dir="ltr">Yesterday at FOSDEM, Roland
Olbricht had a similar issue: he wanted
to show a query over the whole region
Brussels using the name "Bruxelles", but
he just got the results over the city of
Bruxelles. </div>
<div dir="ltr"><br clear="none">
</div>
<div dir="ltr">Any ideas? <br
clear="none">
</div>
<span class="yiv0851718814HOEnZb"></span>
<div dir="ltr"><br clear="none">
</div>
<div dir="ltr">Julien<br clear="none">
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>