Main categories of OpenStreetBrowser
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

243 lines
7.3 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Gebäudearten",
  5. "en": "Building types",
  6. "fr": "Type",
  7. "pt-br": "Tipologias"
  8. },
  9. "query": {
  10. "16": "nwr[building][building!=no];"
  11. },
  12. "feature": {
  13. "pre": [
  14. "{% set type = tags.building|split(';')[0] %}",
  15. "{% if tags.military %}{% set type = 'military' %}{% endif %}",
  16. "{% set color = const.other.color %}",
  17. "{% for cat, data in const %}",
  18. " {% if type in data.types %}",
  19. " {% set color = data.color %}",
  20. " {% endif %}",
  21. "{% endfor %}"
  22. ],
  23. "description": [
  24. "{% if tags.building == 'yes' and tags.military %}",
  25. "{{ tagTrans('building', 'military') }}",
  26. "{% elseif tags.building == 'yes' %}",
  27. "{{ keyTrans('building') }}",
  28. "{% else %}",
  29. "{{ tagTransList('building', tags.building) }}",
  30. "{% endif %}",
  31. "{% if tags.building == 'construction' and tags.construction %}",
  32. "({{ tagTransList('building', tags.construction) }})",
  33. "{% endif %}",
  34. "{% if tags.building in [ 'yes', 'military' ] and tags.military %}",
  35. "({{ tagTransList('military', tags.military) }})",
  36. "{% endif %}"
  37. ],
  38. "markerSymbol": "",
  39. "listMarkerSymbol": "{{ markerPolygon({\"fillColor\": color, \"fillOpacity\": 0.8, \"width\": 1, \"color\": \"#000000\" })|raw }}",
  40. "priority": [
  41. "{% set p = 100 %}",
  42. "{% if tags.name %}{% set p = p - 10 %}{% endif %}",
  43. "{% if tags.amenity %}{% set p = p - 1 %}{% endif %}",
  44. "{% if tags.historic %}{% set p = p - 1 %}{% endif %}",
  45. "{% if tags.culture %}{% set p = p - 1 %}{% endif %}",
  46. "{% if tags.highway %}{% set p = p - 1 %}{% endif %}",
  47. "{% if tags.railway %}{% set p = p - 1 %}{% endif %}",
  48. "{% if tags.aeroway %}{% set p = p - 1 %}{% endif %}",
  49. "{% if tags.amenity %}{% set p = p - 1 %}{% endif %}",
  50. "{% if tags.tourism %}{% set p = p - 1 %}{% endif %}",
  51. "{{ p }}"
  52. ],
  53. "style": {
  54. "width": "1",
  55. "color": "#000000",
  56. "fillColor": "{{ color }}",
  57. "fillOpacity": "0.8"
  58. }
  59. },
  60. "info": [
  61. "<table>",
  62. "{% for cat, data in const %}",
  63. " <tr>",
  64. " <td valign='top'>{{ markerPolygon({ \"fillColor\": data.color, \"fillOpacity\": \"0.8\", \"width\": 1, \"color\": \"#000000\" })|raw }}</td>",
  65. " <td onclick='this.classList.toggle(\"infoShowDetails\")'><b>{{ trans(data.name) }}</b><span class='details'>:",
  66. " {% for i, type in data.types %}<span title='building={{ type }}'>{% if i > 0 %}, {% endif %}{{ tagTrans('building', type) }}</span>{% endfor %}",
  67. " </span>",
  68. "<span class='summary'><i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></span>",
  69. " </td>",
  70. " </tr>",
  71. "{% endfor %}",
  72. "</table>"
  73. ],
  74. "const": {
  75. "residential": {
  76. "name": "tag:building=residential",
  77. "color": "#25a000",
  78. "types": [
  79. "house",
  80. "apartments",
  81. "block",
  82. "flats",
  83. "farm",
  84. "detached",
  85. "dormitory",
  86. "terrace",
  87. "houseboat",
  88. "bungalow",
  89. "static_caravan",
  90. "residential",
  91. "semidetached_house",
  92. "ger",
  93. "trullo"
  94. ]
  95. },
  96. "tourism": {
  97. "name": "tag:tourism",
  98. "color": "#814ce2",
  99. "types": [
  100. "hotel",
  101. "ruins",
  102. "conservatory"
  103. ]
  104. },
  105. "commercial": {
  106. "name": "tag:building=commercial",
  107. "color": "#ec5bcf",
  108. "types": [
  109. "commercial",
  110. "office",
  111. "industrial",
  112. "retail",
  113. "supermarket",
  114. "warehouse",
  115. "kiosk",
  116. "mall",
  117. "shop"
  118. ]
  119. },
  120. "religious": {
  121. "name": "tag:building=religious",
  122. "color": "#af29cc",
  123. "types": [
  124. "religious",
  125. "cathedral",
  126. "chapel",
  127. "church",
  128. "mosque",
  129. "temple",
  130. "synagogue",
  131. "shrine",
  132. "monastery"
  133. ]
  134. },
  135. "amenity": {
  136. "name": "tag:amenity",
  137. "color": "#2935cc",
  138. "types": [
  139. "kindergarten",
  140. "civic",
  141. "government",
  142. "hospital",
  143. "school",
  144. "university",
  145. "grandstand",
  146. "public",
  147. "toilets",
  148. "college"
  149. ]
  150. },
  151. "agriculture": {
  152. "name": "tag:building=agriculture",
  153. "color": "#92e934",
  154. "types": [
  155. "bakehouse",
  156. "barn",
  157. "cowshed",
  158. "farm_auxiliary",
  159. "greenhouse",
  160. "stable",
  161. "sty",
  162. "kitchen",
  163. "slurry_tank",
  164. "silo"
  165. ]
  166. },
  167. "industrial": {
  168. "name": "tag:landuse=industrial",
  169. "color": "#e2da1b",
  170. "types": [
  171. "construction",
  172. "garbage_shed",
  173. "transformer_tower",
  174. "service",
  175. "water_tower",
  176. "industrial",
  177. "warehouse",
  178. "storage_tank"
  179. ]
  180. },
  181. "transportation": {
  182. "name": "tag:building=transportation",
  183. "color": "#1bb5e2",
  184. "types": [
  185. "carport",
  186. "garage",
  187. "garages",
  188. "bridge",
  189. "hangar",
  190. "parking",
  191. "train_station",
  192. "transportation"
  193. ]
  194. },
  195. "sport": {
  196. "name": "tag:sport",
  197. "color": "#e21b66",
  198. "types": [
  199. "pavilion",
  200. "riding_hall",
  201. "stadium",
  202. "sports_hall"
  203. ]
  204. },
  205. "roof": {
  206. "name": "tag:building=roof",
  207. "color": "#afafaf7f",
  208. "types": [
  209. "roof"
  210. ]
  211. },
  212. "shelter": {
  213. "name": "tag:amenity=shelter",
  214. "color": "#cc8725",
  215. "types": [
  216. "cabin",
  217. "hut",
  218. "shed"
  219. ]
  220. },
  221. "military": {
  222. "name": "tag:building=military",
  223. "color": "#4a7300",
  224. "types": [
  225. "bunker",
  226. "military"
  227. ]
  228. },
  229. "unspecified": {
  230. "name": "tag:building=generic",
  231. "color": "#7f7f7f",
  232. "types": [
  233. "yes",
  234. "generic"
  235. ]
  236. },
  237. "other": {
  238. "name": "other",
  239. "color": "#ff0000",
  240. "types": []
  241. }
  242. }
  243. }