You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2017-01-15 10:00:58

Axel Mauruszat
Member
Registered: 2016-02-08
Posts: 10

[Overpass] Karte Berlin mit Buslinie

Ahoi. Als Übersichtsdarstellung für eine Buslinie möchte ich Berlin und die Buslinie darstellen. So weit bin ich mit overpass-turbo gekommen (hier als Beispiel für die Buslinie 186):

[out:json][timeout:25];
{{style:
area[boundary=administrative]
{ color:grey; width:4; fill-color:#fff; fill-opacity:0.4;  }
node
{ symbol-size: 8; color:#95276E; fill-color:#95276E}
way
{ color:#95276E; opacity:1; width: 4 }
}}
// gather results
(
  // query part for: “network="Verkehrsverbund Berlin-Brandenburg" and ref=186”
  relation["network"="Verkehrsverbund Berlin-Brandenburg"]["ref"="186"]({{bbox}});
  // query part for: “name=Berlin and boundary=administrative”
  relation["name"="Berlin"]["boundary"="administrative"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

Als Leaflet-Map sieht das dann so aus.

Frage 1: Im Zentrum Berlins wird nun auch ein Symbol für einen Node (oder ein anderes zu kleines Objekt) angezeigt. Wie bekomme ich das "wegformatiert"?

Frage 2: In Overpass-turbo kann ich folgende Einstellung vornehmen: "Kleine Features nicht wie POIs darstellen". Beim Export nach Leaflet sind diese POI-Darstellungen von kurzen Wegen (auch wenn Sie durchaus darstellbar wären) wieder da. Gibt es einen Weg auch in der Leaflet-Karte kleine Features tatsächlich zeichnen zu lassen?

Weitere Verbesserungsvorschläge sind selbstverständlich auch sehr willkommen.

vielen Dank, viele Grüße
axel

Offline

#2 2017-01-15 12:25:24

mueschel
Member
Registered: 2012-06-11
Posts: 1,181
Website

Re: [Overpass] Karte Berlin mit Buslinie

Zur Abfrage:

Du kannst dir nur die Objekte ausgeben lassen, die dich interessieren. z.B. nur die Wege aus der Berlin-Grenzen-Relation und nur Wege und Knoten aus der Bus-Relation, die die Rolle "stop" oder "" haben.

http://overpass-turbo.eu/s/lgx

  relation["network"="Verkehrsverbund Berlin-Brandenburg"]["ref"="186"]->.bus;
  .bus out body;  //Relation ausgeben
  node(r.bus:"stop"); //Alle Nodes mit Rolle 'stop'
  out body;
  way(r.bus:"");  //Alle ways ohne Rolle
  out body;
  >; out skel;

Offline

Board footer

Powered by FluxBB