Maps/Transport for London/stations, entrances etc not in stop areas

From Bjoern Hassler's website
Jump to: navigation, search

The first version of this page got a bit messy, but it's still here: /stations_not_in_relations. There's a new query below.

1 Query - current state[edit]

Overpass-turbo (run)
Overpass-turbo (run)
Overpass-turbo (view)
// REVISED Detect tube entrances that are not in rels
[out:xml][timeout:25];                                                                                                                                                           
{{rs=["railway"="station"]}}
{{rse=["railway"="subway_entrance"]}}
{{rsp=["railway"="platform"]}}
area[name~"^London|City of London"][admin_level=6][boundary=administrative]->.a;
{{myarea=(area.a)}}
(
  relation["public_transport"="stop_area"]{{myarea}};
  way["public_transport"="stop_area"]{{myarea}};
);
(._; >;)->.b;
(
  relation{{rs}}{{myarea}};
  way{{rs}}{{myarea}};
  node{{rs}}{{myarea}};
  relation{{rse}}{{myarea}};
  way{{rse}}{{myarea}};
  node{{rse}}{{myarea}};
// You could also run this query to find other objects not in relations, e.g. platforms
//  relation{{rsp}}{{myarea}};
//  way{{rsp}}{{myarea}};
//  node{{rsp}}{{myarea}};
);
(._; >;) -> .c;
(.c; - .b;);
out meta qt;
(
  relation{{rs}}{{myarea}};
  way{{rs}}{{myarea}};
  node{{rs}}{{myarea}};
);
out meta qt;
>;
out skel qt;
{{style: 
relation, node, way {
  color: blue; 
  symbol-stroke-color: blue;
  symbol-fill-color: blue; 
  symbol-size: 5;
}
way[railway=subway_entrance], node[railway=subway_entrance] {
  symbol-stroke-color: red;
  symbol-fill-color: yellow;
  symbol-size: 10;
}
relation way[railway=subway_entrance], relation node[railway=subway_entrance] { 
  color: green;
  symbol-stroke-color: yellow;
  symbol-fill-color: yellow;
  symbol-size: 100;
}
way[railway=station], node[railway=station],
way[railway=platform], node[railway=platform] {
  symbol-stroke-color: purple;
  symbol-fill-color: purple;
  symbol-fill-opacity: 1;
  symbol-size: 5;
}
relation[public_transport=stop_area] node, relation[public_transport=stop_area] way, node[bus=yes], node[highway=bus_stop], way[amenity=shelter] {
  symbol-stroke-color: grey;
  symbol-fill-color: grey;
  color:grey;
  symbol-stroke-opacity: 0;
  symbol-fill-opacity: 0;
  symbol-size: 1;
}

}}

2 Query - attic data[edit]

Overpass-turbo (run)
Overpass-turbo (run)
Overpass-turbo (view)
// REVISED Detect tube entrances that are not in rels - attic data
[out:xml][timeout:60][date:"2017-05-04T00:00:00Z"];                                                                                                                                                      
{{rs=["railway"="station"]}}
{{rse=["railway"="subway_entrance"]}}
{{rsp=["railway"="platform"]}}
area[name~"^London|City of London"][admin_level=6][boundary=administrative]->.a;
{{myarea=(area.a)}}
(
  relation["public_transport"="stop_area"]{{myarea}};
  way["public_transport"="stop_area"]{{myarea}};
);
(._; >;)->.b;
(
  relation{{rs}}{{myarea}};
  way{{rs}}{{myarea}};
  node{{rs}}{{myarea}};
  relation{{rse}}{{myarea}};
  way{{rse}}{{myarea}};
  node{{rse}}{{myarea}};
//  relation{{rsp}}{{myarea}};
//  way{{rsp}}{{myarea}};
//  node{{rsp}}{{myarea}};
);
(._; >;) -> .c;
(.c; - .b;);
out meta qt;
(
  relation{{rs}}{{myarea}};
  way{{rs}}{{myarea}};
  node{{rs}}{{myarea}};
);
out meta qt;
>;
out skel qt;
{{style: 
relation, node, way {
  color: blue; 
  symbol-stroke-color: blue;
  symbol-fill-color: blue; 
  symbol-size: 5;
}
way[railway=subway_entrance], node[railway=subway_entrance] {
  symbol-stroke-color: red;
  symbol-fill-color: yellow;
  symbol-size: 10;
}
relation way[railway=subway_entrance], relation node[railway=subway_entrance] { 
  color: green;
  symbol-stroke-color: yellow;
  symbol-fill-color: yellow;
  symbol-size: 100;
}
way[railway=station], node[railway=station],
way[railway=platform], node[railway=platform] {
  symbol-stroke-color: purple;
  symbol-fill-color: purple;
  symbol-fill-opacity: 1;
  symbol-size: 5;
}
relation[public_transport=stop_area] node, relation[public_transport=stop_area] way, node[bus=yes], node[highway=bus_stop], way[amenity=shelter] {
  symbol-stroke-color: grey;
  symbol-fill-color: grey;
  color:grey;
  symbol-stroke-opacity: 0;
  symbol-fill-opacity: 0;
  symbol-size: 1;
}

}}

3 query 3[edit]

Why not do this? It assumes that all stations have stop areas.... so won't work well.

Overpass-turbo (run)
Overpass-turbo (run)
Overpass-turbo (view)
// REVISED Detect tube entrances that are not in rels - attic data
[out:xml][timeout:60][date:"2017-05-04T00:00:00Z"];                                                                                                                                                      
{{test=["railway"="subway_entrance"]}}
area[name~"^London|City of London"][admin_level=6][boundary=administrative]->.a;
{{myarea=(area.a)}}
(
  relation["public_transport"="stop_area"]{{myarea}};
);
out bb qt;
(._; >;)->.b;
(
  relation{{test}}{{myarea}};
  way{{test}}{{myarea}};
  node{{test}}{{myarea}};
);
(._; >;) -> .c;
(.c; - .b;);
out meta qt;
{{style: 
relation, node, way {
  color: blue; 
  symbol-stroke-color: blue;
  symbol-fill-color: blue; 
  symbol-size: 5;
}
way[railway=subway_entrance], node[railway=subway_entrance] {
  symbol-stroke-color: red;
  symbol-fill-color: yellow;
  symbol-size: 10;
}
relation way[railway=subway_entrance], relation node[railway=subway_entrance] { 
  color: green;
  symbol-stroke-color: yellow;
  symbol-fill-color: yellow;
  symbol-size: 100;
}
way[railway=station], node[railway=station],
way[railway=platform], node[railway=platform] {
  symbol-stroke-color: purple;
  symbol-fill-color: purple;
  symbol-fill-opacity: 1;
  symbol-size: 5;
}
relation[public_transport=stop_area] node, relation[public_transport=stop_area] way, node[bus=yes], node[highway=bus_stop], way[amenity=shelter] {
  symbol-stroke-color: grey;
  symbol-fill-color: grey;
  color:grey;
  symbol-stroke-opacity: 0;
  symbol-fill-opacity: 0;
  symbol-size: 1;
}

}}