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.

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