Abfrage von Daten für (Fahrrad)Wegweiser (uMap)

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

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

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}};
);

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

Danke, aber bei mir kommt schon bei dem ersten Versuch:

Cannot load remote data for layer “Hauptwegweiser MIT Direction” with url “https://overpass-api.de/api/interpreter?data=[out:json][timeout:100];(node[“information”=“guidepost”][“bicycle”=“yes”][“direction_south”](53.93739199443395,10.303148031234741,53.94091286668618,10.31344771385193);node[“information”=“guidepost”][“bicycle”=“yes”][“direction_north”](53.93739199443395,10.303148031234741,53.94091286668618,10.31344771385193);node[“information”=“guidepost”][“bicycle”=“yes”][“direction_east”](53.93739199443395,10.303148031234741,53.94091286668618,10.31344771385193);node[“information”=“guidepost”][“bicycle”=“yes”][“direction_west”](53.93739199443395,10.303148031234741,53.94091286668618,10.31344771385193);node[“information”=“guidepost”][“bicycle”=“yes”][“direction_northeast”](53.93739199443395,10.303148031234741,53.94091286668618,10.31344771385193);node[“information”=“guidepost”][“bicycle”=“yes”][“direction_northwest”](53.93739199443395,10.303148031234741,53.94091286668618,10.31344771385193);node[“information”=“guidepost”][“bicycle”=“yes”][“direction_southeast”](53.93739199443395,10.303148031234741,53.94091286668618,10.31344771385193);node[“information”=“guidepost”][“bicycle”=“yes”][“direction_southwest”](53.93739199443395,10.303148031234741,53.94091286668618,10.31344771385193);)out geom;”

Gruß Jan

Sorry, ich hab’ nicht genau genug hingeschaut:

Hinter der schließenden runden Klammer fehlt das Semikolon.