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

2017-09-14 Thread François Lacombe
Hi Joost,

2017-09-14 9:47 GMT+02:00 joost schouppe :

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

Here I got intersection of two areas, but I want union of areas.

I find the solution here :
( area["name"="Vlaanderen"]["admin_level"="4"];
area["name"="Halle"][admin_level=8];)->.perimeter
(
  way["highway"]["name"](area.perimeter);
);
out body;

Jo,

I didn't understand completerly your suggestion. Can you elaborate a bit
more please ?

All the best

François
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


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

2017-09-14 Thread Jo
You could also do this:

[maxsize:4];
(
way["wikidata"="Q212429"][admin_level=3];
way["wikidata"="Q212582"][admin_level=3];
)
._>;
out geom;

No need to store it in placeholders if you only want to join.

Jo

2017-09-14 9:21 GMT+02:00 François Lacombe :

> 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 :
>
>> 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:4];
>> 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 
>> *À :* dev@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@openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/dev
>>
>>
>>
>
> ___
> dev mailing list
> dev@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev
>
>
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


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

2017-09-14 Thread joost schouppe
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 :

> 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 :
>
>> 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:4];
>> 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 
>> *À :* dev@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@openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/dev
>>
>>
>>
>
> ___
> dev mailing list
> dev@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev
>
>


-- 
Joost Schouppe
OpenStreetMap  |
Twitter  | LinkedIn
 | Meetup

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


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

2017-09-14 Thread François Lacombe
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 :

> 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:4];
> 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 
> *À :* dev@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@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev
>
>
>
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev