User:DSMap/View subway entrances

From OpenStreetMap Wiki
Jump to navigation Jump to search

This code allows you to easily view the subway entrances. This option helps to understand the coverage of the metro stations and their scope for stop areas. Uses overpass-turbo (see wiki).

Code

/*
Code for view of subway entrances.

Crédito: DSMap @openstreetmap
Versión 1.
Documentación: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL
*/
(
  // query part for: “subway entrances” and "stations"
  node["railway"="subway_entrance"]({{bbox}});
  way["railway"="subway_entrance"]({{bbox}});
  relation["railway"="subway_entrance"]({{bbox}});
  node["railway"="station"]({{bbox}});
  way["railway"="station"]({{bbox}});
  relation["railway"="station"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

  // set subway_entrances
{{style:
node[railway=subway_entrance],
way[railway=subway_entrance],
relation[railway=subway_entrance]
{ color:blue; fill-color:blue; }
node[railway=station],
way[railway=station],
relation[railway=station]
{ color:lightblue; fill-color:lightblue; }
}}