On 2015-02-02 22:24, Julien Minet wrote :
> OK, I thought about that but I don't know how to combine this with the
> tag "name"? 
>
> 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.
Anding two conditions is chaining two filters.
That is, the output of the first filter is given as input to the second
filter which discards what doesn't match its condition.
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 ;-)

Creating overpass objects (a set) from plain OSM elements identified by
ID is explained here
<http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#By_element_id.>.

For overpass, an area is an object type of its own, in addition to node,
way and relation.
It has an ID of its own too and I myself wondered before how to find it.
But there's now an experimental way to convert a relation ID to area ID
<http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Map_way.2Frelation_to_area_.28map_to_area.29>.

André.


>
> Julien
>
> ------------------------------------------------------------------------
> *De :* Sander Deryckere <sander...@gmail.com>
> *À :* Julien Minet <julien...@yahoo.fr>; OpenStreetMap Belgium
> <talk-be@openstreetmap.org>
> *Envoyé le :* Lundi 2 février 2015 16h16
> *Objet :* Re: [OSM-talk-be] Overpass-turbo issue with Luxembourg
>
> You should include the correct admin_level in the query
>
> 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).
>
> 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).
>
> Regards,
> Sander
>
> 2015-02-02 16:04 GMT+01:00 Julien Minet <julien...@yahoo.fr
> <mailto:julien...@yahoo.fr>>:
>
>
>
>     Hi,
>
>     I have an issue with overpass-turbo and maybe someone could help
>     me. I want to make a query over the "*Province* de Luxembourg" in
>     Belgium, but I cannot separate with results from the *country* of
>     Luxembourg, since they have the same name:
>
>     Example:
>
>     [out:json][timeout:25];
>     // fetch area “Luxembourg” to search in
>     area['name:fr'='Luxembourg']->.searchArea;
>     // gather results
>     (
>       // query part for: “Shop”
>       node["shop"](area.searchArea);
>       way["shop"](area.searchArea);
>       relation["shop"](area.searchArea);
>     );
>     // print results
>     out geom;
>     >;
>
>     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.
>
>     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. 
>
>     Any ideas?
>
>     Julien
>

_______________________________________________
Talk-be mailing list
Talk-be@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-be

Reply via email to