Advertisement
abalosc1

geometry overpass query

Sep 4th, 2019
872
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.82 KB | None | 0 0
  1. [out:json][bbox:{{bbox}}];
  2.  
  3. // Incorrect Geometry
  4. (
  5. node[area=no];
  6. node[oneway];
  7. node[bridge];
  8. node[sidewalk];
  9. node[footway];
  10. node[man_made=embankment];
  11. node[man_made=groyne];
  12. node[man_made=cutline];
  13. node[power=line];
  14. node[cutline];
  15. node[aerialway=cable_car];
  16. node[aerialway=gondola];
  17. node[aerialway=chair_lift];
  18. node[aerialway=mixed_lift];
  19. node[aerialway=drag_lift];
  20. node[aerialway="t-bar"];
  21. node[aerialway="j-bar"];
  22. node[aerialway=platter];
  23. node[aerialway=magic_carpet];
  24. node[aerialway=rope_tow];
  25. node[aerialway=goods];
  26. node[aeroway=taxiway];
  27. node[aeroway=runway];
  28. node[railway=rail];
  29. node[railway=narrow_gauge];
  30. node[railway=monorail];
  31. node[railway=preserved];
  32. node[railway=light_rail];
  33. node[railway=subway];
  34. node[railway=tram];
  35. node[railway=disused];
  36. node[railway=abandoned];
  37. node[waterway=river];
  38. node[waterway=canal];
  39. node[waterway=stream];
  40. node[waterway=ditch];
  41. node[waterway=drain];
  42. node[natural=coastline];
  43. node[natural=ridge];
  44. node[natural=valley];
  45. node[natural=tree_row];
  46. node[boundary=administrative];
  47. node[golf=green];
  48. node[golf=bunker];
  49. node[golf=fairway];
  50. node[area=yes];
  51. node[landuse];
  52. node[natural=scree];
  53. node[natural=scrub];
  54. node[natural=fell];
  55. node[natural=heath];
  56. node[natural=wood];
  57. node[natural=grassland];
  58. node[natural=wetland];
  59. node[natural=water];
  60. node[natural=mud];
  61. node[natural=beach];
  62. node[natural=sand];
  63. node[natural=wood];
  64. node[natural=bare_rock];
  65. node[natural=glacier];
  66. node[waterway=riverbank];
  67. node[man_made=bridge];
  68. node[man_made=breakwater];
  69. node[aeroway=apron];
  70. node[power=plant];
  71. node["building:part"];
  72. node["source:outline"];
  73. node[type=multipolygon];
  74. node[route];
  75. node[restriction];
  76. way[entrance];
  77. way[railway=subway_entrance];
  78. way[man_made=survey_point];
  79. way[aeroway=holding_position];
  80. way[power=transformer];
  81. way[power=pole];
  82. way[power=catenary_mast];
  83. way[power=terminal];
  84. way[power=tower];
  85. way[amenity=vending_machine];
  86. way[natural=peak];
  87. way[natural=saddle];
  88. way[natural=volcano];
  89. way[natural=tree];
  90. way[highway=give_way];
  91. way[highway=milestone];
  92. way[highway=mini_roundabout];
  93. way[highway=stop];
  94. way[highway=street_lamp];
  95. way[highway=traffic_signals];
  96. way[highway=turning_loop];
  97. way[highway=turning_circle];
  98. way[highway=motorway_junction];
  99. way[restriction][restriction ~ "(no_right_turn|no_left_turn|no_u_turn|no_straight_on|only_right_turn|only_left_turn|only_straight_on|no_entry|no_exit)"];
  100. way[type=multipolygon];
  101. way[route=bus];
  102. node[leisure=park][natural=tree];
  103. node[leisure=park][natural!=tree];
  104. node["source:geometry"];
  105.  
  106.  
  107. );
  108.  
  109. out body;
  110. >;
  111. out skel qt;
  112.  
  113.  
  114. // Node features that should be connected to a way but are not.
  115. way->.ways;
  116. (
  117. node(w.ways)[entrance];
  118. node(w.ways)[traffic_calming];
  119. node(w.ways)[highway=passing_place];
  120. node(w.ways)[highway=mini_roundabout];
  121. node(w.ways)[highway=motorway_junction];
  122. node(w.ways)[highway=turning_loop];
  123. node(w.ways)[highway=turning_circle];
  124. node(w.ways)[highway=stop];
  125. node(w.ways)[highway=give_way];
  126. node(w.ways)[highway=traffic_signals];
  127. node(w.ways)[highway=crossing];
  128. node(w.ways)[crossing];
  129. node(w.ways)[highway=milestone];
  130. node(w.ways)[railway=milestone];
  131. node(w.ways)[railway=crossing];
  132. node(w.ways)[railway=level_crossing];
  133. node(w.ways)[railway=buffer_stop];
  134. node(w.ways)[public_transport=stop_position];
  135. node(w.ways)[aeroway=holding_position];
  136. node(w.ways)[noexit];
  137. node(w.ways)[waterway=dam];
  138. node(w.ways)[waterway=weir];
  139. node(w.ways)[waterway=waterfall];
  140. node(w.ways)[amenity=ferry_terminal];
  141. node(w.ways)[leisure=slipway];
  142. node(w.ways)[mountain_pass=yes];
  143. node(w.ways)[barrier=gate];
  144. node(w.ways)[barrier=lift_gate];
  145. node(w.ways)[barrier=swing_gate];
  146. node(w.ways)[barrier=toll_booth];
  147. node(w.ways)[barrier=turnstile];
  148. node(w.ways)[barrier="full-height_turnstile"];
  149. node(w.ways)[barrier=motorcycle_barrier];
  150. node(w.ways)[barrier=rope];
  151. node(w.ways)[barrier=sally_port];
  152. node(w.ways)[barrier=spikes];
  153. node(w.ways)[barrier=stile];
  154. node(w.ways)[barrier=sump_buster];
  155. node(w.ways)[barrier=kerb];
  156. node(w.ways)[barrier=border_control];
  157. node(w.ways)[barrier=bump_gate];
  158. node(w.ways)[barrier=bus_trap];
  159. node(w.ways)[barrier=cattle_grid];
  160. node(w.ways)[barrier=chain];
  161. node(w.ways)[barrier=cycle_barrier];
  162. node(w.ways)[barrier=hampshire_gate];
  163. node(w.ways)[barrier=height_restrictor];
  164. node(w.ways)[barrier=debris];
  165. )->.connected;
  166.  
  167. (
  168. node[entrance];
  169. node[traffic_calming];
  170. node[highway=passing_place];
  171. node[highway=mini_roundabout];
  172. node[highway=motorway_junction];
  173. node[highway=turning_loop];
  174. node[highway=turning_circle];
  175. node[highway=stop];
  176. node[highway=give_way];
  177. node[highway=traffic_signals];
  178. node[highway=crossing];
  179. node[crossing];
  180. node[highway=milestone];
  181. node[railway=milestone];
  182. node[railway=crossing];
  183. node[railway=level_crossing];
  184. node[railway=buffer_stop];
  185. node[public_transport=stop_position];
  186. node[aeroway=holding_position];
  187. node[noexit];
  188. node[waterway=dam];
  189. node[waterway=weir];
  190. node[waterway=waterfall];
  191. node[amenity=ferry_terminal];
  192. node[leisure=slipway];
  193. node[mountain_pass=yes];
  194. node[barrier=gate];
  195. node[barrier=lift_gate];
  196. node[barrier=swing_gate];
  197. node[barrier=toll_booth];
  198. node[barrier=turnstile];
  199. node[barrier="full-height_turnstile"];
  200. node[barrier=motorcycle_barrier];
  201. node[barrier=rope];
  202. node[barrier=sally_port];
  203. node[barrier=spikes];
  204. node[barrier=stile];
  205. node[barrier=sump_buster];
  206. node[barrier=kerb];
  207. node[barrier=border_control];
  208. node[barrier=bump_gate];
  209. node[barrier=bus_trap];
  210. node[barrier=cattle_grid];
  211. node[barrier=chain];
  212. node[barrier=cycle_barrier];
  213. node[barrier=hampshire_gate];
  214. node[barrier=height_restrictor];
  215. node[barrier=debris];
  216. )->.all;
  217.  
  218. (.all; - .connected;);
  219.  
  220. out body;
  221. >;
  222. out skel qt;
  223.  
  224.  
  225.  
  226. // Where a bridge and a waterway share a node
  227. (
  228. way[railway][bridge];
  229. way[highway][bridge];
  230. )->.bridge;
  231.  
  232. node(w.bridge)->.bridgenodes;
  233.  
  234. way[waterway]->.water;
  235.  
  236. node(w.water)->.waternodes;
  237.  
  238. node.bridgenodes.waternodes->.intersect;
  239.  
  240. way(bn.intersect);
  241.  
  242. out body;
  243. >;
  244. out skel qt;
  245.  
  246.  
  247. /* INFO LEVEL CHECKS
  248.  
  249. way[highway]->.hwy;
  250.  
  251. node(w.hwy)[tourism=information][information=guidepost];
  252.  
  253. out body;
  254. >;
  255. out skel qt;
  256.  
  257. */
  258.  
  259. // Where a highway connects to an inappropriate feature
  260. way[highway]->.hwy;
  261.  
  262. (
  263. node(w.hwy)[amenity][!entrance][amenity !~"(parking|parking_space|parking_entrance|motorcycle_parking|bicycle_parking|bus_station|car_wash|ferry_terminal|weighbridge)"];
  264. node(w.hwy)[building][!entrance];
  265. node(w.hwy)[leisure][!entrance][leisure!=slipway];
  266. node(w.hwy)[office][!entrance];
  267. node(w.hwy)[shop][!entrance];
  268. )->.result;
  269.  
  270. way(bn.result);
  271.  
  272. out body;
  273. >;
  274. out skel qt;
  275.  
  276. // Node connects a power line or cable with an object which is not related to the power infrastructure
  277. (
  278. way[power=line];
  279. way[power=minor_line];
  280. way[power=cable];
  281. )->.line;
  282.  
  283. node(w.line)->.linenodes;
  284.  
  285. way[!power][!building]->.badfeature;
  286.  
  287. node(w.badfeature)->.badfeaturenodes;
  288.  
  289. node.linenodes.badfeaturenodes->.result;
  290.  
  291. way(bn.result);
  292.  
  293. out body;
  294. >;
  295. out skel qt;
  296.  
  297.  
  298.  
  299. // a ford should be on a node where a waterway and highway intersect
  300. node[ford][ford!=no]->.allford;
  301.  
  302. way[waterway]->.wway;
  303.  
  304. way[highway]->.hwy;
  305.  
  306. (
  307. node(w.wway)[ford][ford!=no];
  308. node(w.wway)[ford][ford!=no];
  309. )->.wwayford;
  310.  
  311. (
  312. node(w.hwy)[ford][ford!=no];
  313. node(w.hwy)[ford][ford!=no];
  314. )->.hwyford;
  315.  
  316. node.wwayford.hwyford->.intersectford;
  317.  
  318. (.allford; - .intersectford;)->.fords;
  319.  
  320. .fords out body;
  321.  
  322. way(bn.fords);
  323.  
  324. out body;
  325. >;
  326. out skel qt;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement