Subject: Overpass API developpement
List archive
- From: Jan Marsch <>
- To:
- Subject: [overpass] Odd results when switching from Overpass QL to XML
- Date: Mon, 22 Feb 2016 01:16:14 +0100
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.