Lübeck
(Lübeck)
March 28, 2025, 7:45pm
1
Moin!
ich möchte in einer umap Haupt- (information=guidepost) und Zwischenwegweiser (information=route_marker) darstellen.
Derzeit sieht die URL die Datenabfrage wie folgt aus:
Hauptwegweiser:
https://overpass-api.de/api/interpreter?data=[out:json][timeout:25];node[“information”=“guidepost”]({south},{west},{north},{east});out geom;
Zwischenwegweiser:
https://overpass-api.de/api/interpreter?data=[out:json][timeout:25];node[“information”=“route_marker”]({south},{west},{north},{east});out geom;
Es gibt nun einige Fragen in diesem zusammenhang die ich irgendwie nicht umgesetzt bekommen.
Zum einen für die Abfrage auf Fahrrad gibt es die Tags bicycle=yes ODER guidepost=bicycle - wie dieses oder berücksichten?
Bei den Hauptwegweisern würde ich gerne noch eine zweite Variante integrieren bei der abgeprüft wird, ob direction_ in seinen 8 verschiedenen Varianten enthalten ist. So kann ich kennzeichnen, ob Wegweiser noch ohne Richtungsangaben vorliegen. (hierzu siehe auch https://wiki.openstreetmap.org/wiki/DE:Tag:information%3Dguidepost#Merkmale,_die_im_Zusammenhang_verwendet_werden )
Kann mir einer weiterhelfen?
Gruß Jan
Folgende Overpass-Turbo-Abfrage liefert das gewünschte (auch wenn ich Dein
({south},{west},{north},{east})
nicht verstehe:
[out:json][timeout:25];
// gather results
(
node
["information"="guidepost"]
["bicycle"="yes"]
[!"direction_northeast"]
[!"direction_northwest"]
[!"direction_southeast"]
[!"direction_southwest"]
[!"direction_north"]
[!"direction_east"]
[!"direction_south"]
[!"direction_west"]({{bbox}});
node
["information"="guidepost"]
["guidepost"="bicycle"]
[!"direction_northeast"]
[!"direction_northwest"]
[!"direction_southeast"]
[!"direction_southwest"]
[!"direction_north"]
[!"direction_east"]
[!"direction_south"]
[!"direction_west"]({{bbox}});
);
// print results
out geom;
Siehe overpass turbo
fx99
(Fx99)
March 29, 2025, 10:11am
3
Das ist das umap Äquivalent zu ({{bbox}})
2 Likes
führt somit zu
https://overpass-api.de/api/interpreter?data=
[out:json][timeout:50];
(
node["information"="guidepost"]["guidepost"="bicycle"][!"direction_northeast"][!"direction_northwest"][!"direction_southeast"][!"direction_southwest"][!"direction_north"][!"direction_east"][!"direction_south"][!"direction_west"]({south},{west},{north},{east});
node["information"="guidepost"]["bicycle"="yes"][!"direction_northeast"][!"direction_northwest"][!"direction_southeast"][!"direction_southwest"][!"direction_north"][!"direction_east"][!"direction_south"][!"direction_west"]({south},{west},{north},{east});
);
out;
Siehe Unbenannte Karte - uMap - Online map creator
Lübeck
(Lübeck)
March 29, 2025, 7:50pm
5
Moin!
das ist eigentlich schon klasse - nun habe ich nur ein Darstellungsproblem.
Es werden auch alle die angezeigt, die nicht auf die direction getestet werden bei einem anderen Marker.
Es fehlt noch die Definition information=guidepost & guidepost=bicycle & min. einer direction_xxxx _- welche ist egal. (mache das jetzt nur für eine bicycle-Variante)
Kann mir da auch noch einer weiterhelfen??
Jan
Hallo Jan,
Du hast also für jede der 8 Hauptrichtungen eine Zeile wie folgt:
(
node["information"="guidepost"]["guidepost"="bicycle"]["direction_northeast"]({south},{west},{north},{east});
node["information"="guidepost"]["guidepost"="bicycle"]["direction_northwest"]({south},{west},{north},{east});
...
)
Das sind die roten Marker (in einer zweiten Ebene), siehe Unbenannte Karte - uMap - Online map creator
Ich hab’ den Timeout auf 100 hochsetzen müssen, damit die Anzeige funktioniert.
Erläuterung:
node["information"="guidepost"]["guidepost"="bicycle"]["direction_northeast"]
ist eine UND-Verknüpfung: alle drei Eigenschaften müssen vorhanden sein
Eine ODER-Verknüpfung erhält man, indem man die Anweisungen in runden Klammern hintereinander schreibt:
(
Anweisung 1{{bbox}};
Anweisung 2{{bbox}};
Anweisung 3{{bbox}};
);
Lübeck
(Lübeck)
March 29, 2025, 8:41pm
7
Danke erst einmal.
Alles etwas komplex. Habe ich das richtig verstanden so:
https://overpass-api.de/api/interpreter?data=[out:json][timeout:100];
(
node["information"="guidepost"]["bicycle"="yes"]["direction_south"]({south},{west},{north},{east});
node["information"="guidepost"]["bicycle"="yes"]["direction_north"]({south},{west},{north},{east});
node["information"="guidepost"]["bicycle"="yes"]["direction_east"]({south},{west},{north},{east});
node["information"="guidepost"]["bicycle"="yes"]["direction_west"]({south},{west},{north},{east});
node["information"="guidepost"]["bicycle"="yes"]["direction_northeast"]({south},{west},{north},{east});
node["information"="guidepost"]["bicycle"="yes"]["direction_northwest"]({south},{west},{north},{east});
node["information"="guidepost"]["bicycle"="yes"]["direction_southeast"]({south},{west},{north},{east});
node["information"="guidepost"]["bicycle"="yes"]["direction_southwest"]({south},{west},{north},{east});
)
out geom;
(etwas umformatiert!)
Gruß Jan
Genau. Oder halt eben ["guidepost"="bicycle"]
statt ["bicycle"="yes"]
…
Sorry, ich hab’ nicht genau genug hingeschaut:
Hinter der schließenden runden Klammer fehlt das Semikolon.