[OSM-dev] Overpass filter by area A or area B

joost schouppe joost.schouppe at gmail.com
Thu Sep 14 07:47:29 UTC 2017


I got some outside help (I think on help.openstreetmap.org) but I think
this does basically what you need:

http://overpass-turbo.eu/s/rHN

(my problem was that also Halle, Germany would get returned if I didn't do
it properly)

2017-09-14 9:21 GMT+02:00 François Lacombe <fl.infosreseaux at gmail.com>:

> Hi Pierre,
>
> Thank you for your answer
> The point was to merge two area and select ways (or any object) inside the
> merged perimeter.
> That's why I awkwardly wrote the "way(area.area_1,area.area_2);" thing
>
> I took random wikidata ID for the example, and I will filter objects
> inside the area a lot more.
> Then the result won't exceed OAPI limits.
>
> If I can't merge areas to give only one filter at the end of the query,
> then I'd better do as many queries as areas
>
>
> All the best
>
> François
>
> 2017-09-14 0:55 GMT+02:00 Pierre Béland <pierzenh at yahoo.fr>:
>
>> Bonjour François
>>
>> I revised your query as below, making the query in two steps and adding
>> maxsize parameter. Even then, I have problem since relation for France
>> metropolitaine requires a lot of memory. If we try to increase
>> significantly this value, the server rejects the query since it takes too
>> much resources.
>>
>> regard
>>
>> Pierre
>>
>> [maxsize:400000000];
>> area["wikidata"="Q212429"][admin_level=3]->.area_1;
>> way(area.area_1);
>> out geom;
>> area["wikidata"="Q212582"][admin_level=3]->.area_2;
>> way(area.area_2);
>> out geom;
>>
>> ------------------------------
>> *De :* François Lacombe <fl.infosreseaux at gmail.com>
>> *À :* dev at openstreetmap.org
>> *Envoyé le :* mercredi 13 Septembre 2017 17h49
>> *Objet :* [OSM-dev] Overpass filter by area A or area B
>>
>> Hi all,
>>
>> I wonder how to filter objects in several areas in Overpass API.
>>
>> I assume this query:
>> area["wikidata"="Q212429"][admin_level=3]->.area_1;
>> area["wikidata"="Q212582"][admin_level=3]->.area_2;
>>
>> way(area.area_1,area.area_2);
>> out geom;
>>
>> would give all ways contained in area_1 and area_2 as results.
>>
>> Is this possible ?
>>
>> All the best
>>
>> François
>> _______________________________________________
>> dev mailing list
>> dev at openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/dev
>>
>>
>>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev
>
>


-- 
Joost Schouppe
OpenStreetMap <http://www.openstreetmap.org/user/joost%20schouppe/> |
Twitter <https://twitter.com/joostjakob> | LinkedIn
<https://www.linkedin.com/pub/joost-schouppe/48/939/603> | Meetup
<http://www.meetup.com/OpenStreetMap-Belgium/members/97979802/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20170914/34c0eeb7/attachment-0001.html>


More information about the dev mailing list