Browse Source

Replace pt_routes/pt_stops by new pt category

pedestrian
parent
commit
d2c789f1b1
  1. 33
      index.json
  2. 48
      pt.json
  3. 49
      pt_stops.json

33
index.json

@ -159,38 +159,7 @@
] ]
}, },
{ {
"id": "transport_pt",
"type": "index",
"name": {
"ast": "Tresporte Públicu",
"cs": "Veřejná doprava",
"de": "Öffentlicher Verkehr",
"el": "Δημόσιες Μεταφορές",
"en": "Public Transportation",
"et": "Ühistransport",
"fr": "Transports publics",
"hu": "Tömegközlekedés",
"it": "Trasporti pubblici",
"ja": "公共輸送",
"nl": "Openbaar vervoer",
"pl": "Transport Publiczny",
"ro": "Transport public",
"ru": "Общественный транспорт",
"uk": "Громадський транспорт",
"pt-br": "Transporte Público",
"pt": "Transportes públicos"
},
"subCategories": [
{
"id": "pt_amenities"
},
{
"id": "pt_stops"
},
{
"id": "pt_routes"
}
]
"id": "pt"
}, },
{ {
"id": "transport_car", "id": "transport_car",

48
pt_routes.json → pt.json

@ -1,6 +1,25 @@
{ {
"type": "overpass", "type": "overpass",
"name": { "name": {
"ast": "Tresporte Públicu",
"cs": "Veřejná doprava",
"de": "Öffentlicher Verkehr",
"el": "Δημόσιες Μεταφορές",
"en": "Public Transportation",
"et": "Ühistransport",
"fr": "Transports publics",
"hu": "Tömegközlekedés",
"it": "Trasporti pubblici",
"ja": "公共輸送",
"nl": "Openbaar vervoer",
"pl": "Transport Publiczny",
"ro": "Transport public",
"ru": "Общественный транспорт",
"uk": "Громадський транспорт",
"pt-br": "Transporte Público",
"pt": "Transportes públicos"
},
"name_routes": {
"de": "Routen", "de": "Routen",
"en": "Routes", "en": "Routes",
"fr": "Lignes", "fr": "Lignes",
@ -11,13 +30,23 @@
"12": "relation[type=route][route~\"^(subway|monorail|ferry|train)$\"];", "12": "relation[type=route][route~\"^(subway|monorail|ferry|train)$\"];",
"14": "relation[type=route][route~\"^(subway|monorail|aerialway|bus|trolleybus|ferry|train|tram)$\"];" "14": "relation[type=route][route~\"^(subway|monorail|aerialway|bus|trolleybus|ferry|train|tram)$\"];"
}, },
"members": true,
"feature": { "feature": {
"styles": "",
"title": [ "title": [
"{% if tags.ref %}{{ tags.ref }} - {% endif %}", "{% if tags.ref %}{{ tags.ref }} - {% endif %}",
"", "",
"{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) | default(trans('unnamed')) }}" "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) | default(trans('unnamed')) }}"
], ],
"description": "{{ tagTrans('route', tags.route) }}", "description": "{{ tagTrans('route', tags.route) }}",
"body": [
"<h4>Stops</h4>",
"{% for member in members %}",
"{% if member.role|slice(-4) == 'stop' %}",
"<div object='{{ member.id }}' sublayer='member'><b>{{ member.tags.name }}</b></div>",
"{% endif %}",
"{% endfor %}"
],
"listMarkerSign": "{{ const[tags.route].sign|raw }}", "listMarkerSign": "{{ const[tags.route].sign|raw }}",
"markerSymbol": null, "markerSymbol": null,
"listMarkerSymbol": "{{ markerCircle({fillColor:const[tags.route].color})|raw }}", "listMarkerSymbol": "{{ markerCircle({fillColor:const[tags.route].color})|raw }}",
@ -25,6 +54,25 @@
"color": "{{ const[tags.route].color }}" "color": "{{ const[tags.route].color }}"
} }
}, },
"memberFeature": {
"listMarkerSymbol": "{{ markerCircle({})|raw }}",
"style": {
"color": [
"{% set master = masters[0] %}",
"{{ {'subway':'#0000ff','tram':'#007fff','trolley':'#ff007f','bus':'#ff0000'}[master.tags.route]|default('#000000') }}"
],
"width": "{% if map.zoom>=15 %}5{% else %}3{% endif %}"
},
"title": "{% if tags.public_transport == 'stop_position' %}{{ tags.name }}{% endif %}",
"listStopsTitle": "{{ tags.name }}: {% for master in masters %}{{ master.tags.ref }} {% endfor %}",
"body": [
"{% for master in masters %}",
" '<div object=\"{{ master.id }}\"><b>{{ master.tags.name|default(master.tags.ref) }}</b> ({{ master.id }})</div>",
"{% endfor %}"
],
"listRoutesExclude": "true",
"listStopsExclude": "{% set isStop = 0 %}{% for master in masters %}{% if master.role|slice(-4) == 'stop' %}{% set isStop = 1 %}{% endif %}{% endfor %}{{ not isStop }}"
},
"info": [ "info": [
"<table>", "<table>",
"{% for value, data in const %}", "{% for value, data in const %}",

49
pt_stops.json

@ -1,49 +0,0 @@
{
"type": "overpass",
"name": {
"ast": "Paraes y estaciones",
"cs": "Zastávky & Stanice",
"de": "Haltestellen",
"el": "Στάσεις & Σταθμοί",
"en": "Stops & Stations",
"es": "Paradas y estaciones",
"fr": "Arrêts/Stops, Stations",
"hu": "Megállók és állomások",
"it": "Stazioni e fermate",
"ja": "停留所と駅",
"nl": "Haltes en Stations",
"pl": "Przystanki i Stacje",
"pt": "Paragens e estações",
"pt-br": "Paradas e Estações",
"ru": "Остановки и станции",
"uk": "Зупинки та станції"
},
"query": {
"14": [
"(",
"node[railway~\"^(station|halt|tram_stop|platform)$\"];",
"way[railway~\"^(station|platform)$\"];",
"node[highway~\"^(bus_stop|platform)$\"];",
"way[highway~\"^(platform)$\"];",
"node[public_transport~\"^(stop_position|platform)$\"];",
"way[public_transport~\"^(platform)$\"];",
"node[amenity~\"^(ferry_terminal|bus_station)$\"];",
")"
]
},
"feature": {
"pre": [
"{% if tags.amenity in [ 'ferry_terminal', 'bus_station' ] %}",
" {% set key = 'amenity' %}",
" {% set value = tags.amenity %}",
"{% elseif tags.railway == 'platform' or tags.highway == 'platform' or tags.public_transport == 'platform' %}",
" {% set key = 'public_transport' %}",
" {% set value = 'platform' %}",
"{% else %}",
" {% set key = 'public_transport' %}",
" {% set value = 'stop_position' %}",
"{% endif %}"
],
"description": "{{ tagTrans(key, value) }}"
}
}
Loading…
Cancel
Save