abalosc1

wrong railway crossing overpass query

Sep 4th, 2019
164
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // KeepRight - 160: Wrongly Used Railway Crossing Tag
  2. [out:json][bbox:{{bbox}}];
  3.  
  4. (
  5.   way[highway][layer][layer!=0];
  6.   relation[highway][layer][layer!=0];
  7.   )->.lyr;
  8.  
  9. node(w.lyr)->.node1;
  10.  
  11.  
  12. (
  13.   way[railway][!layer];
  14.   relation[railway][!layer];
  15.  )->.nolyr;
  16.  
  17. node(w.nolyr)->.node2;
  18.  
  19. node.node1.node2[railway=level_crossing];
  20.  
  21. way(bn);
  22.  
  23. // print results
  24. out body;
  25. >;
  26. out skel qt;
  27.  
  28. (
  29.   way[railway][layer][layer!=0];
  30.   relation[railway][layer][layer!=0];
  31.   )->.lyr;
  32.  
  33. node(w.lyr)->.node1;
  34.  
  35.  
  36. (
  37.   way[highway][!layer];
  38.   relation[highway][!layer];
  39.  )->.nolyr;
  40.  
  41. node(w.nolyr)->.node2;
  42.  
  43. node.node1.node2[railway=level_crossing];
  44.  
  45. way(bn);
  46.  
  47. // print results
  48. out body;
  49. >;
  50. out skel qt;
  51.  
  52.  
  53. (
  54.   way[railway][layer][layer="-5"];
  55.   way[highway][layer][layer="-5"];
  56.   )->.lyr;
  57.  
  58. node(w.lyr)->.node1;
  59.  
  60. (
  61.   way[railway][layer][layer!="-5"];
  62.   way[highway][layer][layer!="-5"];
  63.   )->.nolyr;
  64.  
  65. node(w.nolyr)->.node2;
  66.  
  67. node.node1.node2[railway=level_crossing];
  68.  
  69. way(bn);
  70.  
  71. // print results
  72. out body;
  73. >;
  74. out skel qt;
  75.  
  76.  
  77. (
  78.   way[railway][layer][layer="-4"];
  79.   way[highway][layer][layer="-4"];
  80.   )->.lyr;
  81.  
  82. node(w.lyr)->.node1;
  83.  
  84. (
  85.   way[railway][layer][layer!="-4"];
  86.   way[highway][layer][layer!="-4"];
  87.   )->.nolyr;
  88.  
  89. node(w.nolyr)->.node2;
  90.  
  91. node.node1.node2[railway=level_crossing];
  92.  
  93. way(bn);
  94.  
  95. // print results
  96. out body;
  97. >;
  98. out skel qt;
  99.  
  100. (
  101.   way[railway][layer][layer="-3"];
  102.   way[highway][layer][layer="-3"];
  103.   )->.lyr;
  104.  
  105. node(w.lyr)->.node1;
  106.  
  107. (
  108.   way[railway][layer][layer!="-3"];
  109.   way[highway][layer][layer!="-3"];
  110.   )->.nolyr;
  111.  
  112. node(w.nolyr)->.node2;
  113.  
  114. node.node1.node2[railway=level_crossing];
  115.  
  116. way(bn);
  117.  
  118. // print results
  119. out body;
  120. >;
  121. out skel qt;
  122.  
  123. (
  124.   way[railway][layer][layer="-2"];
  125.   way[highway][layer][layer="-2"];
  126.   )->.lyr;
  127.  
  128. node(w.lyr)->.node1;
  129.  
  130. (
  131.   way[railway][layer][layer!="-2"];
  132.   way[highway][layer][layer!="-2"];
  133.   )->.nolyr;
  134.  
  135. node(w.nolyr)->.node2;
  136.  
  137. node.node1.node2[railway=level_crossing];
  138.  
  139. way(bn);
  140.  
  141. // print results
  142. out body;
  143. >;
  144. out skel qt;
  145.  
  146. (
  147.   way[railway][layer][layer="-1"];
  148.   way[highway][layer][layer="-1"];
  149.   )->.lyr;
  150.  
  151. node(w.lyr)->.node1;
  152.  
  153. (
  154.   way[railway][layer][layer!="-1"];
  155.   way[highway][layer][layer!="-1"];
  156.   )->.nolyr;
  157.  
  158. node(w.nolyr)->.node2;
  159.  
  160. node.node1.node2[railway=level_crossing];
  161.  
  162. way(bn);
  163.  
  164. // print results
  165. out body;
  166. >;
  167. out skel qt;
  168.  
  169. (
  170.   way[railway][layer][layer="1"];
  171.   way[highway][layer][layer="1"];
  172.   )->.lyr;
  173.  
  174. node(w.lyr)->.node1;
  175.  
  176. (
  177.   way[railway][layer][layer!="1"];
  178.   way[highway][layer][layer!="1"];
  179.   )->.nolyr;
  180.  
  181. node(w.nolyr)->.node2;
  182.  
  183. node.node1.node2[railway=level_crossing];
  184.  
  185. way(bn);
  186.  
  187. // print results
  188. out body;
  189. >;
  190. out skel qt;
  191.  
  192. (
  193.   way[railway][layer][layer="2"];
  194.   way[highway][layer][layer="2"];
  195.   )->.lyr;
  196.  
  197. node(w.lyr)->.node1;
  198.  
  199. (
  200.   way[railway][layer][layer!="2"];
  201.   way[highway][layer][layer!="2"];
  202.   )->.nolyr;
  203.  
  204. node(w.nolyr)->.node2;
  205.  
  206. node.node1.node2[railway=level_crossing];
  207.  
  208. way(bn);
  209.  
  210. // print results
  211. out body;
  212. >;
  213. out skel qt;
  214.  
  215. (
  216.   way[railway][layer][layer="3"];
  217.   way[highway][layer][layer="3"];
  218.   )->.lyr;
  219.  
  220. node(w.lyr)->.node1;
  221.  
  222. (
  223.   way[railway][layer][layer!="3"];
  224.   way[highway][layer][layer!="3"];
  225.   )->.nolyr;
  226.  
  227. node(w.nolyr)->.node2;
  228.  
  229. node.node1.node2[railway=level_crossing];
  230.  
  231. way(bn);
  232.  
  233. // print results
  234. out body;
  235. >;
  236. out skel qt;
  237.  
  238. (
  239.   way[railway][layer][layer="4"];
  240.   way[highway][layer][layer="4"];
  241.   )->.lyr;
  242.  
  243. node(w.lyr)->.node1;
  244.  
  245. (
  246.   way[railway][layer][layer!="4"];
  247.   way[highway][layer][layer!="4"];
  248.   )->.nolyr;
  249.  
  250. node(w.nolyr)->.node2;
  251.  
  252. node.node1.node2[railway=level_crossing];
  253.  
  254. way(bn);
  255.  
  256. // print results
  257. out body;
  258. >;
  259. out skel qt;
  260.  
  261. (
  262.   way[railway][layer][layer="5"];
  263.   way[highway][layer][layer="5"];
  264.   )->.lyr;
  265.  
  266. node(w.lyr)->.node1;
  267.  
  268. (
  269.   way[railway][layer][layer!="5"];
  270.   way[highway][layer][layer!="5"];
  271.   )->.nolyr;
  272.  
  273. node(w.nolyr)->.node2;
  274.  
  275. node.node1.node2[railway=level_crossing];
  276.  
  277. way(bn);
  278.  
  279. // print results
  280. out body;
  281. >;
  282. out skel qt;
RAW Paste Data