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.

60 lines
4.2 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "en": "Railway infrastructure",
  5. "de": "Eisenbahn Infrastruktur"
  6. },
  7. "query": {
  8. "11": "(way[railway=rail][usage~'^(main|branch)$'];node[railway~'^(station)$'];)",
  9. "14": "(way[railway];node[railway~'^(station|halt|tram_stop)$'];)",
  10. "17": "(node[railway];way[railway];)"
  11. },
  12. "feature": {
  13. "title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}",
  14. "description": "{{ tagTrans('railway', tags.railway) }}",
  15. "body": [
  16. "{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %}",
  17. "{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}",
  18. "{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}<br/>{% endif %}",
  19. "{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/>",
  20. "{% if tags.electrified == 'no' %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ keyTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ keyTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}<br/>{% endif %}"
  21. ],
  22. "markerSign": null,
  23. "priority": "{% if tags.railway == 'station' %}0{% elseif tags.railway in [ 'halt', 'tram_stop' ] %}1{% else %}5{% endif %}",
  24. "styles": "{% if tags.railway == 'narrow_gauge' %}default,casing{% else %}default{% endif %}",
  25. "style": {
  26. "weight": "{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}1{% else %}{% if tags.railway == 'rail' %}{% if tags.usage == 'main' or tags.usage == 'branch' %}3{% else %}2{% endif %}{% elseif tags.railway == 'platform' %}1{% else %}2{% endif %}{% endif %}",
  27. "color": "{% if tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' %}{% if tags.usage == 'main' %}#ff8100{% elseif tags.usage == 'branch' %}#daca00{% else %}#000000{% endif %}{% elseif tags.railway == 'subway' %}#0000ff{% elseif tags.railway == 'tram' %}#ff00ff{% elseif tags.railway == 'light_rail' %}#00BD14{% elseif tags.railway == 'platform' %}#3f3f3f{% else %}#000000{% endif %}",
  28. "opacity": "1",
  29. "dashArray": "{% if tags.railway == 'rail' %}{% elseif tags.railway == 'disused' %}1,5{% elseif tags.railway == 'abandoned' %}1,7{% endif %}",
  30. "fill": [
  31. "{% if tags.railway == 'platform' %}",
  32. "1",
  33. "{% elseif type == 'node' %}",
  34. "1",
  35. "{% else %}",
  36. "{% endif %}"
  37. ],
  38. "fillColor": [
  39. "{% if tags.railway == 'platform' %}",
  40. "#3f3f3f",
  41. "{% elseif type == 'node' %}",
  42. "#ffffff",
  43. "{% endif %}"
  44. ],
  45. "fillOpacity": [
  46. "{% if tags.railway == 'platform' %}",
  47. "0.2",
  48. "{% elseif type == 'node' %}",
  49. "0",
  50. "{% endif %}"
  51. ]
  52. },
  53. "style:casing": {
  54. "weight": "{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}5{% else %}{% if tags.railway == 'rail' %}{% if tags.usage == 'main' or tags.usage == 'branch' %}7{% else %}6{% endif %}{% elseif tags.railway == 'platform' %}5{% else %}6{% endif %}{% endif %}",
  55. "color": "{% if tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' %}{% if tags.usage == 'main' %}#ff8100{% elseif tags.usage == 'branch' %}#daca00{% else %}#000000{% endif %}{% elseif tags.railway == 'subway' %}#0000ff{% elseif tags.railway == 'tram' %}#ff00ff{% elseif tags.railway == 'light_rail' %}#00BD14{% elseif tags.railway == 'platform' %}#3f3f3f{% else %}#000000{% endif %}",
  56. "lineCap": "butt",
  57. "dashArray": "2,4"
  58. }
  59. }
  60. }