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.

142 lines
4.7 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Einrichtungen",
  5. "en": "Amenities",
  6. "fr": "Équipements vélo",
  7. "hu": "Kerékpáros létesítmények",
  8. "pt-br": "Equipamentos"
  9. },
  10. "query": {
  11. "13": [
  12. "(",
  13. "nwr[amenity~\"^(bicycle_rental)$\"];",
  14. "node[amenity~\"^(charging_station)$\"][bicycle][bicycle!=\"no\"];",
  15. "nwr[shop~\"^(bicycle)$\"];",
  16. "nwr[rental~\"^(.*;|)bicycle(|;.*)$\"];",
  17. ")"
  18. ],
  19. "16": [
  20. "(",
  21. "nwr[amenity~\"^(bicycle_.*|compressed_air)$\"];",
  22. "node[amenity~\"^(charging_station)$\"][bicycle][bicycle!=\"no\"];",
  23. "nwr[shop~\"^(bicycle)$\"];",
  24. "nwr[\"monitoring:bicycle\"];",
  25. "nwr[vending~\"^(bicycle_tube)$\"];",
  26. "nwr[rental~\"^(.*;|)bicycle(|;.*)$\"];",
  27. ")"
  28. ]
  29. },
  30. "feature": {
  31. "pre": [
  32. "{% if tags.shop in [ 'bicycle' ] %}",
  33. " {% set key = 'shop' %}",
  34. " {% set value = tags.shop %}",
  35. "{% elseif attribute(tags, \"monitoring:bicycle\") %}",
  36. " {% set key = 'man_made' %}",
  37. " {% set value = 'monitoring_station' %}",
  38. "{% elseif tags.vending in [ 'bicycle_tube' ] %}",
  39. " {% set key = 'vending' %}",
  40. " {% set value = tags.vending %}",
  41. "{% elseif 'bicycle' in tags.rental|split(';') %}",
  42. " {% set key = 'amenity' %}",
  43. " {% set value = 'bicycle_rental' %}",
  44. "{% else %}",
  45. " {% set key = 'amenity' %}",
  46. " {% set value = tags.amenity %}",
  47. "{% endif %}",
  48. "",
  49. "{% set constIndex = (key ~ \"=\" ~ value) %}"
  50. ],
  51. "title": [
  52. "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) }}",
  53. "",
  54. "{% if tags.capacity %}({{ tags.capacity }}){% endif %}"
  55. ],
  56. "description": [
  57. "{% if tags.amenity == 'vending_machine' %}",
  58. "{{ tagTransList('amenity=vending_machine vending', value) }}",
  59. "{% else %}",
  60. "{{ tagTrans(key, value) }}",
  61. "{% endif %}"
  62. ],
  63. "body": [
  64. "{% if tags.capacity %}",
  65. " {{ keyTrans('capacity') }}: {{ tags.capacity }}",
  66. "{% endif %}"
  67. ],
  68. "markerSign": "{{ const[constIndex]['sign'] }}",
  69. "priority": [
  70. "{% if const[constIndex] and const[constIndex]['priority']['capacity'] %}",
  71. " {% set max=const[constIndex]['priority']['default'] %}",
  72. " {% for v in const[constIndex]['priority']['capacity'] %}",
  73. " {% if tags.capacity >= v[0] %}{% set max=v[1] %}{% endif %}",
  74. " {% endfor %}",
  75. " {{ max }}",
  76. "{% elseif const[constIndex] is defined %}",
  77. "{{ const[constIndex]['priority'] }}",
  78. "{% else %}",
  79. "10",
  80. "{% endif %}"
  81. ]
  82. },
  83. "const": {
  84. "shop=bicycle": {
  85. "sign": "🚲",
  86. "priority": 0
  87. },
  88. "amenity=bicycle_repair_station": {
  89. "sign": "🔧",
  90. "priority": 2
  91. },
  92. "amenity=bicycle_parking": {
  93. "sign": "🅿",
  94. "priority": {
  95. "capacity": [
  96. [
  97. 0,
  98. 3
  99. ],
  100. [
  101. 20,
  102. 2
  103. ],
  104. [
  105. 100,
  106. 0
  107. ]
  108. ],
  109. "default": 3
  110. }
  111. },
  112. "amenity=bicycle_rental": {
  113. "sign": "R",
  114. "filter_query": "(nwr[amenity=bicycle_rental];nwr[rental~\"^(.*;|)bicycle(|;.*)$\"];nwr['service:bicycle:rental']['service:bicycle:rental'!='no'];)",
  115. "priority": 1
  116. },
  117. "man_made=monitoring_station": {
  118. "sign": "#",
  119. "priority": 4
  120. },
  121. "vending=bicycle_tube": {
  122. "sign": "T",
  123. "priority": 2
  124. },
  125. "amenity=compressed_air": {
  126. "sign": "A",
  127. "priority": 2
  128. },
  129. "amenity=charging_station": {
  130. "sign": "🔌",
  131. "priority": 2
  132. }
  133. },
  134. "filter": {
  135. "type": {
  136. "name": "{{ trans('filter:type') }}",
  137. "show_default": "true",
  138. "type": "select",
  139. "values": "{% for k, v in const %}<option value=\"{{ k }}\" query=\"{{ v.filter_query|default('nwr[' ~ k ~ ']') }}\">{{ tagTrans(k) }}</option>{% endfor %}"
  140. }
  141. }
  142. }