hallo rayquaza hallo Harald,
vielen Dank für eure Antworten - werde das am WE alles mal näher ansehen.
Habe die Bounding-Box oben mal noch korrigiert. Jetzt muesste was rauskommen.
die moeglichkeiten die ihr aufzeigt sind sehr vielversprechend:
- all-to-nodes kenn ich auch aus osmconvert / - filter.
- mit XPath. per Wildcard Elementenebenen im DOM überspringen seh ich mir am WE mal an.
es müsste eine Abfrage sein, welche alle Objektarten erfasst - wie hier beschrieben:
nodes, ways and relations - All kind of objects
cf http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#All_kind_of_objects
And, finally, we search for all kind of objects with a certain tag within a bounding box. You need to repeat the tag for every type and to use the union operator. To allow us displaying everything on a map, we also ask for the nodes and ways that are referred by the relations and ways in the result:
Overpass XML
by the way: Harald - du nimmst dieses “itterative” Moment ja auch in deiner Erklärung auf - und formulierst die Abfrage für ways und node! - siehe oben!
<osm-script>
<union>
<query type="node">
<has-kv k="amenity" v="fire_station"/>
<bbox-query e="7.3" n="50.8" s="50.6" w="7.0"/>
</query>
<query type="way">
<has-kv k="amenity" modv="" v="fire_station"/>
<bbox-query e="7.3" n="50.8" s="50.6" w="7.0"/>
</query>
<query type="relation">
<has-kv k="amenity" modv="" v="fire_station"/>
<bbox-query e="7.3" n="50.8" s="50.6" w="7.0"/>
</query>
</union>
<union>
<item/>
<recurse type="down"/>
</union>
<print/>
</osm-script>
geht man also von dem obigen Beispiel aus - dann sollte das analo so wie hier unten aussehen - also alles vorhanden sein
$query = 'node
["addr:postcode"~"RM12"]
(51.5557914,0.2118915,51.5673083,0.2369398);
node
(around:1000)
["amenity"~"fast_food"];
out;';
$query = 'way
["addr:postcode"~"RM12"]
(51.5557914,0.2118915,51.5673083,0.2369398);
node
(around:1000)
["amenity"~"fast_food"];
out;';
$query = 'relation'
["addr:postcode"~"RM12"]
(51.5557914,0.2118915,51.5673083,0.2369398);
node
(around:1000)
["amenity"~"fast_food"];
out;';
kurz gefasst also die drei query-types:
<query type="node">
<query type="way">
<query type="relation">
@ Harald: du hast diesen Sachverhalt in deinem Antwrortschreiben auch schon erwähnt.
was meint ihr denn.
vg tagtheworld
Meld mich wieder.
VG
**update; ** betreffend den Wildcards von Xpath im DOM denke ich dass es hier auch angesprochen ist:
http://stackoverflow.com/questions/4203119/xpath-wildcards-on-node-name
This is the correct XPath 1.0 expression wich select an element with last 5 character of name
equal to
"_cost"
in any namespace.
/data/stats/*[substring(name(), string-length(name()) - 4) = '_cost']
With XPath 1.0 you can use
/data/stats/*[substring-after(name(), '_cost') = '']
pattern.
That checks if element’s name ends with the _cost suffix.
In XPath 2.0 there is
fn:ends-with(str, str)
and your corresponding experssion will be
*[ends-with(name(), '_cost')].