Subject: Overpass API developpement
List archive
- From: Jan Marsch <>
- To:
- Cc: "" <>
- Subject: Re: [overpass] Odd results when switching from Overpass QL to XML
- Date: Tue, 23 Feb 2016 00:50:42 +0100
I already suspected, my query could be much simpler. Works fine.
It also confirmed, my database is corrupt.
Thank you very much, this was very helpful.
Jan Marsch
> Am 22.02.2016 um 02:56 schrieb Pierre Béland <>:
>
> I suggest that you avoid mixing parent and child queries.
>
> In the query below, the union is to extract only the parent objects and
> output them before querying the childs.
>
> From Overpass-turbo, Using the Query export function to translate in xml, I
> obtained the same result.
>
> this give 431 nodes, 54 ways and 7 relations.
>
>
> [out:json];
> (
> way["building"](52.516710528069794, 13.406785726547241, 52.51946886742985,
> 13.41103971004486
> );
> way["building:part"](52.516710528069794, 13.406785726547241,
> 52.51946886742985, 13.41103971004486
> );
> relation["building"](52.516710528069794, 13.406785726547241,
> 52.51946886742985, 13.41103971004486
> );
> relation["building:part"](52.516710528069794, 13.406785726547241,
> 52.51946886742985, 13.41103971004486
> );
> relation["type"="building"](52.516710528069794, 13.406785726547241,
> 52.51946886742985, 13.41103971004486
> );
> );
> out;
> >;
> out;
>
>
> Pierre
>
>
> De : Jan Marsch <>
> À :
> Envoyé le : Dimanche 21 février 2016 19h16
> Objet : [overpass] Odd results when switching from Overpass QL to XML
>
> Hello,
>
> TL;DR: When converting Overpass QL to XML Query, results get messed up.
>
> Formerly with direct access to public Overpass, I’ve used this query to get
> all buildings & parts:
>
> [out:json];
> (
> way["building"]({s},{w},{n},{e});
> node(w);
> way["building:part"]({s},{w},{n},{e});
> node(w);
> relation["building"]({s},{w},{n},{e});
> way(r);
> node(w);
> relation["building:part"]({s},{w},{n},{e});
> way(r);
> node(w);
> relation["type"="building"]({s},{w},{n},{e});
> way(r);
> node(w);
> );out;
>
> Now I’m running a local Overpass instance which gets accessed by a custom
> web server.
> In order to use osm3s_query, I needed to convert the query to XML with
> http://overpass-turbo.eu/
> Result is this:
>
> <osm-script output="json">
> <union into="_">
> <query into="_" type="way">
> <has-kv k="building" modv="" v=""/>
> <bbox-query e="13.41103971004486" into="_" n="52.51946886742985"
> s="52.516710528069794" w="13.406785726547241"/>
> </query>
> <recurse from="_" into="_" type="way-node"/>
> <query into="_" type="way">
> <has-kv k="building:part" modv="" v=""/>
> <bbox-query e="13.41103971004486" into="_" n="52.51946886742985"
> s="52.516710528069794" w="13.406785726547241"/>
> </query>
> <recurse from="_" into="_" type="way-node"/>
> <query into="_" type="relation">
> <has-kv k="building" modv="" v=""/>
> <bbox-query e="13.41103971004486" into="_" n="52.51946886742985"
> s="52.516710528069794" w="13.406785726547241"/>
> </query>
> <recurse from="_" into="_" type="relation-way"/>
> <recurse from="_" into="_" type="way-node"/>
> <query into="_" type="relation">
> <has-kv k="building:part" modv="" v=""/>
> <bbox-query e="13.41103971004486" into="_" n="52.51946886742985"
> s="52.516710528069794" w="13.406785726547241"/>
> </query>
> <recurse from="_" into="_" type="relation-way"/>
> <recurse from="_" into="_" type="way-node"/>
> <query into="_" type="relation">
> <has-kv k="type" modv="" v="building"/>
> <bbox-query e="13.41103971004486" into="_" n="52.51946886742985"
> s="52.516710528069794" w="13.406785726547241"/>
> </query>
> <recurse from="_" into="_" type="relation-way"/>
> <recurse from="_" into="_" type="way-node"/>
> </union>
> <print e="" from="_" geometry="skeleton" limit="" mode="body" n=""
> order="id" s="" w=""/>
> </osm-script>
>
> When executing this now, it misses a lot of building parts and ssemingly
> properties as well.
>
> I’m very unsure, whether the syntax is correct and whether union and
> recursions work properly.
>
> 1. Can I probably use the Overpass QL withiut havin Apache in place?
> 2. Could you review my XML query, regarding the intended query above?
>
> Thank you very much
> Jan
>
- [overpass] Odd results when switching from Overpass QL to XML, Jan Marsch, 02/22/2016
- Re: [overpass] Odd results when switching from Overpass QL to XML, Pierre Béland, 02/22/2016
- Re: [overpass] Odd results when switching from Overpass QL to XML, Jan Marsch, 02/23/2016
- Re: [overpass] Odd results when switching from Overpass QL to XML, mmd, 02/22/2016
- Re: [overpass] Odd results when switching from Overpass QL to XML, Jan Marsch, 02/23/2016
- Re: [overpass] Odd results when switching from Overpass QL to XML, Pierre Béland, 02/22/2016
Archive powered by MHonArc 2.6.18.