Browse Source

Merge branch 'maxspeed'

pedestrian
parent
commit
64eef93855
  1. 5
      car_maxspeed.json
  2. 3
      culture_religion.json
  3. 34
      historic.json
  4. 3
      index.json
  5. 67
      memorial.json
  6. 117
      railway-maxspeed.json
  7. 15
      religion.json

5
car_maxspeed.json

@ -57,7 +57,10 @@
"listMarkerSymbol": "line",
"style": {
"width": "3",
"color": "{{ color }}"
"color": "{{ color }}",
"text": "{{ maxspeed }} ",
"textRepeat": "1",
"textFontWeight": "bold"
}
},
"const": {

3
culture_religion.json

@ -28,6 +28,9 @@
{
"id": "historic"
},
{
"id": "memorial"
},
{
"id": "religion"
},

34
historic.json

@ -22,28 +22,22 @@
"query": {
"11": [
"(",
"node[historic~\"^(castle|archaeological_site|battlefield|monument)$\"];",
"way[historic~\"^(castle|archaeological_site|battlefield|monument)$\"];",
"relation[historic~\"^(castle|archaeological_site|battlefield|monument)$\"];",
"node[historic~\"^(castle|archaeological_site|battlefield)$\"];",
"way[historic~\"^(castle|archaeological_site|battlefield)$\"];",
"relation[historic~\"^(castle|archaeological_site|battlefield)$\"];",
")"
],
"14": [
"(",
"node[historic];",
"way[historic];",
"relation[historic];",
"node[historic][historic!~\"^(memorial|monument|wayside_cross|wayside_shrine)$\"];",
"way[historic][historic!~\"^(memorial|monument|wayside_cross|wayside_shrine)$\"];",
"relation[historic][historic!~\"^(memorial|monument|wayside_cross|wayside_shrine)$\"];",
")"
]
},
"feature": {
"pre": [
"{% set value = tags.historic %}",
"{% if const[tags.historic ~ ' memorial=' ~ tags.memorial] %}",
" {% set value = tags.historic ~ ' memorial=' ~ tags.memorial %}",
"{% endif %}"
],
"description": "{{ tagTransList('historic', value) }}",
"markerSign": "{{ const[value].sign|raw }}"
"description": "{{ tagTransList('historic', tags.historic) }}",
"markerSign": "{{ const[tags.historic].sign|raw }}"
},
"info": [
"<table>",
@ -79,18 +73,6 @@
"aircraft": {
"sign": "<img src='maki:airport'>",
"zoom": 14
},
"memorial": {
"sign": "<span style='position: relative; top: -2px;'><img src='maki:monument?size=11'></span>",
"zoom": 14
},
"memorial memorial=plaque": {
"sign": "",
"zoom": 14
},
"monument": {
"sign": "<img src='maki:monument?size=15'>",
"zoom": 11
}
}
}

3
index.json

@ -277,6 +277,9 @@
{
"id": "railway-electrification"
},
{
"id": "railway-maxspeed"
},
{
"id": "railway-routes"
}

67
memorial.json

@ -0,0 +1,67 @@
{
"type": "overpass",
"name": {
"de": "Denkmäler",
"en": "Memorials"
},
"query": {
"11": [
"(",
"node[historic~\"^(monument)$\"];",
"way[historic~\"^(monument)$\"];",
"relation[historic~\"^(monument)$\"];",
")"
],
"14": [
"(",
"node[historic~\"^(memorial|monument)$\"];",
"way[historic~\"^(memorial|monument)$\"];",
"relation[historic~\"^(memorial|monument)$\"];",
")"
]
},
"feature": {
"pre": [
"{% set value = tags.historic %}",
"{% if tags.historic == 'memorial' and tags.memorial %}",
" {% set value = tags.historic ~ ' memorial=' ~ tags.memorial %}",
"{% elseif tags.historic == 'memorial' and attribute(tags, 'memorial:type') %}",
" {% set value = tags.historic ~ ' memorial=' ~ attribute(tags, 'memorial:type') %}",
"{% endif %}"
],
"description": "{{ tagTransList('historic', value) }}",
"markerSign": "{{ const[value].sign|raw }}"
},
"info": [
"<table>",
"{% for value, data in const %}",
"{% if data.zoom <= map.zoom %}",
" <tr>",
" <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
" <td>{{ tagTrans('historic', value) }}</td>",
" </tr>",
"{% endif %}",
"{% endfor %}",
"{% if 14 <= map.zoom %}",
" <tr>",
" <td>{{ markerCircle({})|raw }}<div class='sign'></div></td>",
" <td>{{ trans('other') }}</td>",
" </tr>",
"{% endif %}",
"</table>"
],
"const": {
"memorial": {
"sign": "<span style='position: relative; top: -2px;'><img src='maki:monument?size=11'></span>",
"zoom": 14
},
"memorial memorial=plaque": {
"sign": "",
"zoom": 14
},
"monument": {
"sign": "<img src='maki:monument?size=15'>",
"zoom": 11
}
}
}

117
railway-maxspeed.json

@ -0,0 +1,117 @@
{
"type": "overpass",
"name": {
"de": "Eisenbahn Höchstgeschwindigkeiten",
"en": "Railway Maxspeed",
"fr": "Limites de vitesse",
"hu": "Sebességkorlátozás",
"pt": "Velocidade máxima",
"pt-br": "Velocidade máxima"
},
"query": {
"11": "way[railway=rail][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'][usage~'^(main|branch)$'];",
"14": "way[railway][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'];"
},
"feature": {
"pre": [
"{% if tags.maxspeed is not defined %}",
"{% set maxspeedKmh = null %}",
"{% set maxspeed = null %}",
"{% set unit = null %}",
"{% else %}",
"",
"{% if tags.maxspeed|matches(\"^[0-9]+$\") %}",
"{% set maxspeedKmh = tags.maxspeed %}",
"{% set maxspeed = tags.maxspeed %}",
"{% set unit = \"km/h\" %}",
"{% endif %}",
"",
"",
"{% set m = tags.maxspeed|matches(\"(^[0-9]+) mph$\") %}",
"{% if m %}",
"{% set maxspeedKmh = m[1] * 1.60934 %}",
"{% set maxspeed = m[1] %}",
"{% set unit = \"mph\" %}",
"{% endif %}",
"",
"{% endif %}",
"",
"{% if not maxspeedKmh %}",
"{% set color = \"#404040\" %}",
"{% else %}",
"{% set color = colorInterpolate(const.colorMap, (maxspeedKmh - const.offsetColorSpeed) / const.highestColorSpeed) %}",
"{% endif %}"
],
"description": [
"{% if maxspeed %}",
"<span style='color: {{ color }}'>{{ maxspeed }} {{ unit }}</span>",
"{% elseif tags.maxspeed %}",
"{{ tags.maxspeed }}",
"{% else %}",
"{{ trans('unknown') }}",
"{% endif %}"
],
"markerSymbol": null,
"listMarkerSymbol": "line",
"style": {
"width": "3",
"color": "{{ color }}",
"text": "{{ maxspeed }} ",
"textRepeat": "1",
"textFontWeight": "bold"
}
},
"const": {
"colorMap": [
"#00af00",
"#ff7f00",
"#ff0000",
"#af00af"
],
"highestColorSpeed": 300,
"offsetColorSpeed": 20
},
"info": [
"<div style='display: inline-block'>",
"<table>",
" <tr>",
" <td>{{ markerLine(evaluate({}))|raw }}</td>",
" <td colspan>{{ trans('unknown') }}</td>",
" </tr>",
"{% for i in range(25, 280, 25) %}",
" <tr>",
" <td>{{ markerLine(evaluate({ \"maxspeed\": i }))|raw }}</td>",
" <td>{{ i }}km/h</td>",
" </tr>",
"{% endfor %}",
" <tr>",
" <td>{{ markerLine(evaluate({ \"maxspeed\": 300 }))|raw }}</td>",
" <td>≥300km/h</td>",
" </tr>",
"</table>",
"</div>",
"",
"<div style='display: inline-block'>",
"<table>",
" <tr>",
" <td>{{ markerLine(evaluate({}))|raw }}</td>",
" <td colspan>{{ trans('unknown') }}</td>",
" </tr>",
"{% for i in range(15, 150, 15) %}",
" <tr>",
" <td>{{ markerLine(evaluate({ \"maxspeed\": (i * 1.60934)|round }))|raw }}</td>",
" <td>{{ i }}mph</td>",
" </tr>",
"{% endfor %}",
" <tr>",
" <td>{{ markerLine(evaluate({ \"maxspeed\": (175 * 1.60934)|round }))|raw }}</td>",
" <td>175mph</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"maxspeed\": (200 * 1.60934)|round }))|raw }}</td>",
" <td>≥200mph</td>",
" </tr>",
"</table>",
"</div>"
]
}

15
religion.json

@ -27,6 +27,18 @@
"way[landuse~\"^(cemetery)$\"];",
"relation[landuse~\"^(cemetery)$\"];",
")"
],
"14": [
"(",
"node[amenity~\"^(place_of_worship|grave_yard|crematorium)$\"];",
"way[amenity~\"^(place_of_worship|grave_yard|crematorium)$\"];",
"relation[amenity~\"^(place_of_worship|grave_yard|crematorium)$\"];",
"way[landuse~\"^(cemetery)$\"];",
"relation[landuse~\"^(cemetery)$\"];",
"node[historic~\"^wayside_(cross|shrine)$\"];",
"way[historic~\"^wayside_(cross|shrine)$\"];",
"relation[historic~\"^wayside_(cross|shrine)$\"];",
")"
]
},
"feature": {
@ -34,6 +46,9 @@
"{% if tags.landuse == 'cemetery' %}",
"{% set key = 'landuse' %}",
"{% set value = tags.landuse %}",
"{% elseif tags.historic == 'wayside_cross' or tags.historic == 'wayside_shrine' %}",
"{% set key = 'historic' %}",
"{% set value = tags.historic %}",
"{% else %}",
"{% set key = 'amenity' %}",
"{% set value = tags.amenity %}",

Loading…
Cancel
Save