From 6340841df152a4f913f2fb9dd4ca931d143af591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 19 Jul 2019 07:30:11 +0200 Subject: [PATCH 1/5] climbing: unfinished category --- climbing.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 climbing.json diff --git a/climbing.json b/climbing.json new file mode 100644 index 0000000..2624bc3 --- /dev/null +++ b/climbing.json @@ -0,0 +1,15 @@ +{ + "type": "overpass", + "name": { + "en": "Climbing" + }, + "query": { + "11": [ + "(", + "nwr[sport~\"^(.*;|)climbing(|;.*)$\"];", + "nwr[highway=via_ferrata];", + "nwr[climbing~\"^(route|crag|boulder)$\"];", + ")" + ] + } +} From 9df744635830ced140a30887c907fcd13d2cf908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 19 Jul 2019 09:13:03 +0200 Subject: [PATCH 2/5] climbing: description, body --- climbing.json | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/climbing.json b/climbing.json index 2624bc3..1ed76aa 100644 --- a/climbing.json +++ b/climbing.json @@ -11,5 +11,36 @@ "nwr[climbing~\"^(route|crag|boulder)$\"];", ")" ] + }, + "feature": { + "description": [ + "{% set dash = false %}", + "{% if tags.leisure == 'sports_centre' %}", + " {{ tagTrans('leisure', 'sports_centre') }}", + " {% set dash=true %}", + "{% endif %}", + "", + "{% if tags.highway == 'via_ferrata' %}", + " {% if dash %} - {% endif %}", + " {{ tagTrans('highway', 'via_ferrata') }}", + " {% set dash=true %}", + "{% endif %}", + "", + "{% if tags.natural %}", + " {% if dash %} - {% endif %}", + " {{ tagTransList('natural', tags.natural) }}", + " {% set dash=true %}", + "{% endif %}", + "", + "{% if tags.climbing and tags.climbing != 'yes' %}", + " {% if dash %} - {% endif %}", + " {{ tagTransList('climbing', tags.climbing) }}", + "{% endif %}" + ], + "body": [ + "{{ tags|json_encode }}", + "", + "{% if tags.via_ferrata_scale %}{{ keyTrans('via_ferrata_scale') }}: {{ tags.via_ferrata_scale }}{% endif %}
" + ] } } From e05f88051955defbd9bc98a6431458c7a6de5115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 19 Jul 2019 09:14:54 +0200 Subject: [PATCH 3/5] Update 'climbing.json' --- climbing.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/climbing.json b/climbing.json index 1ed76aa..d3b8a02 100644 --- a/climbing.json +++ b/climbing.json @@ -37,10 +37,6 @@ " {{ tagTransList('climbing', tags.climbing) }}", "{% endif %}" ], - "body": [ - "{{ tags|json_encode }}", - "", - "{% if tags.via_ferrata_scale %}{{ keyTrans('via_ferrata_scale') }}: {{ tags.via_ferrata_scale }}{% endif %}
" - ] + "body": "{% if tags.via_ferrata_scale %}{{ keyTrans('via_ferrata_scale') }}: {{ tags.via_ferrata_scale }}{% endif %}
" } } From 3424431fc678c8dede0a8ec8644fdbf4b82ff928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 1 Aug 2019 09:23:35 +0200 Subject: [PATCH 4/5] climbing: improvements, link from 'outdoor' --- climbing.json | 25 +++++++++++++++---------- outdoor.json | 3 +++ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/climbing.json b/climbing.json index d3b8a02..316652c 100644 --- a/climbing.json +++ b/climbing.json @@ -4,31 +4,36 @@ "en": "Climbing" }, "query": { - "11": [ + "12": [ "(", "nwr[sport~\"^(.*;|)climbing(|;.*)$\"];", "nwr[highway=via_ferrata];", "nwr[climbing~\"^(route|crag|boulder)$\"];", ")" + ], + "16": [ + "(", + "nwr[sport~\"^(.*;|)climbing(|;.*)$\"];", + "nwr[highway=via_ferrata];", + "nwr[climbing];", + ")" ] }, "feature": { "description": [ "{% set dash = false %}", - "{% if tags.leisure == 'sports_centre' %}", - " {{ tagTrans('leisure', 'sports_centre') }}", - " {% set dash=true %}", - "{% endif %}", - "", - "{% if tags.highway == 'via_ferrata' %}", + "{% if tags.natural %}", + " {{ tagTransList('natural', tags.natural) }}", + " {% set dash=true %}", + "{% elseif tags.leisure %}", " {% if dash %} - {% endif %}", - " {{ tagTrans('highway', 'via_ferrata') }}", + " {{ tagTransList('leisure', tags.leisure) }}", " {% set dash=true %}", "{% endif %}", "", - "{% if tags.natural %}", + "{% if tags.highway == 'via_ferrata' %}", " {% if dash %} - {% endif %}", - " {{ tagTransList('natural', tags.natural) }}", + " {{ tagTrans('highway', 'via_ferrata') }}", " {% set dash=true %}", "{% endif %}", "", diff --git a/outdoor.json b/outdoor.json index eb3c290..d6b7aa7 100644 --- a/outdoor.json +++ b/outdoor.json @@ -10,6 +10,9 @@ "subCategories": [ { "id": "mtb-routes" + }, + { + "id": "climbing" } ] } From dfed302378c26aaad0766ce7f75b9822fa8647cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 1 Aug 2019 15:07:21 +0200 Subject: [PATCH 5/5] Climbing: show detailed information --- climbing.json | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/climbing.json b/climbing.json index 316652c..1ffe33d 100644 --- a/climbing.json +++ b/climbing.json @@ -9,6 +9,7 @@ "nwr[sport~\"^(.*;|)climbing(|;.*)$\"];", "nwr[highway=via_ferrata];", "nwr[climbing~\"^(route|crag|boulder)$\"];", + "nwr[~\"^climbing:\"~\"^(yes|[0-9]+)$\"];", ")" ], "16": [ @@ -16,6 +17,7 @@ "nwr[sport~\"^(.*;|)climbing(|;.*)$\"];", "nwr[highway=via_ferrata];", "nwr[climbing];", + "nwr[~\"^climbing:\"~\"^(yes|[0-9]+)$\"];", ")" ] }, @@ -42,6 +44,33 @@ " {{ tagTransList('climbing', tags.climbing) }}", "{% endif %}" ], - "body": "{% if tags.via_ferrata_scale %}{{ keyTrans('via_ferrata_scale') }}: {{ tags.via_ferrata_scale }}{% endif %}
" + "body": [ + "
    ", + " {% if attribute(tags, 'ele') %}
  • {{ keyTrans('ele') }}: {{ tags.ele }}m
  • {% endif %}", + " {% if attribute(tags, 'climbing:length') %}
  • {{ keyTrans('climbing:length') }}: {{ attribute(tags, 'climbing:length') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:length:min') or attribute(tags, 'climbing:length:max') %}
  • {{ keyTrans('climbing:length') }}: {{ attribute(tags, 'climbing:length:min') }} - {{ attribute(tags, 'climbing:length:max') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:grade:uiaa') or attribute(tags, 'climbing:grade:uiaa:min') or attribute(tags, 'climbing:grade:uiaa:max ') %}
  • {{ keyTrans('climbing:grade:uiaa') }}: {% if attribute(tags, 'climbing:grade:uiaa:min') or attribute(tags, 'climbing:grade:uiaa:max ') %}{{ attribute(tags, 'climbing:grade:uiaa:min') }} - {{ attribute(tags, 'climbing:grade:uiaa:max') }}{% else %}{{ attribute(tags, 'climbing:grade:uiaa') }}{% endif %}
  • {% endif %}", + " {% if attribute(tags, 'climbing:grade:UIAA') or attribute(tags, 'climbing:grade:UIAA:min') or attribute(tags, 'climbing:grade:UIAA:max ') %}
  • {{ keyTrans('climbing:grade:uiaa') }}: {% if attribute(tags, 'climbing:grade:UIAA:min') or attribute(tags, 'climbing:grade:UIAA:max ') %}{{ attribute(tags, 'climbing:grade:UIAA:min') }} - {{ attribute(tags, 'climbing:grade:UIAA:max') }}{% else %}{{ attribute(tags, 'climbing:grade:UIAA') }}{% endif %}
  • {% endif %}", + " {% if attribute(tags, 'climbing:grade:french') or attribute(tags, 'climbing:grade:french:min') or attribute(tags, 'climbing:grade:french:max ') %}
  • {{ keyTrans('climbing:grade:french') }}: {% if attribute(tags, 'climbing:grade:french:min') or attribute(tags, 'climbing:grade:french:max ') %}{{ attribute(tags, 'climbing:grade:french:min') }} - {{ attribute(tags, 'climbing:grade:french:max') }}{% else %}{{ attribute(tags, 'climbing:grade:french') }}{% endif %}
  • {% endif %}", + " {% if attribute(tags, 'climbing:grade:saxon') or attribute(tags, 'climbing:grade:saxon:min') or attribute(tags, 'climbing:grade:saxon:max ') %}
  • {{ keyTrans('climbing:grade:saxon') }}: {% if attribute(tags, 'climbing:grade:saxon:min') or attribute(tags, 'climbing:grade:saxon:max ') %}{{ attribute(tags, 'climbing:grade:saxon:min') }} - {{ attribute(tags, 'climbing:grade:saxon:max') }}{% else %}{{ attribute(tags, 'climbing:grade:saxon') }}{% endif %}
  • {% endif %}", + " {% if attribute(tags, 'climbing:grade:polish') or attribute(tags, 'climbing:grade:polish:min') or attribute(tags, 'climbing:grade:polish:max ') %}
  • {{ keyTrans('climbing:grade:polish') }}: {% if attribute(tags, 'climbing:grade:polish:min') or attribute(tags, 'climbing:grade:polish:max ') %}{{ attribute(tags, 'climbing:grade:polish:min') }} - {{ attribute(tags, 'climbing:grade:polish:max') }}{% else %}{{ attribute(tags, 'climbing:grade:polish') }}{% endif %}
  • {% endif %}", + " {% if attribute(tags, 'climbing:bolted') %}
  • {{ keyTrans('climbing:bolted') }}: {{ attribute(tags, 'climbing:bolted') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:orientation') %}
  • {{ keyTrans('climbing:orientation') }}: {{ tagTransList('direction', attribute(tags, 'climbing:orientation')) }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:quality') %}
  • {{ keyTrans('climbing:quality') }}: {{ attribute(tags, 'climbing:quality') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:rock') %}
  • {{ keyTrans('climbing:rock') }}: {{ tagTransList('material', attribute(tags, 'climbing:rock')) }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:routes') %}
  • {{ keyTrans('climbing:routes') }}: {{ attribute(tags, 'climbing:routes') }}
  • {% endif %}", + " {% if tags.via_ferrata_scale %}
  • {{ keyTrans('via_ferrata_scale') }}: {{ tags.via_ferrata_scale }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:boulder') %}
  • {{ keyTrans('climbing:boulder') }}: {{ attribute(tags, 'climbing:boulder') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:sport') %}
  • {{ keyTrans('climbing:sport') }}: {{ attribute(tags, 'climbing:sport') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:speed') %}
  • {{ keyTrans('climbing:speed') }}: {{ attribute(tags, 'climbing:speed') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:toprope') %}
  • {{ keyTrans('climbing:toprope') }}: {{ attribute(tags, 'climbing:toprope') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:trad') %}
  • {{ keyTrans('climbing:trad') }}: {{ attribute(tags, 'climbing:trad') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:multipitch') %}
  • {{ keyTrans('climbing:multipitch') }}: {{ attribute(tags, 'climbing:multipitch') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:ice') %}
  • {{ keyTrans('climbing:ice') }}: {{ attribute(tags, 'climbing:ice') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:mixed') %}
  • {{ keyTrans('climbing:mixed') }}: {{ attribute(tags, 'climbing:mixed') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:deepwater') %}
  • {{ keyTrans('climbing:deepwater') }}: {{ attribute(tags, 'climbing:deepwater') }}
  • {% endif %}", + " {% if attribute(tags, 'climbing:summit_log') %}
  • {{ keyTrans('climbing:quality') }}: {{ attribute(tags, 'climbing:quality') }}
  • {% endif %}", + "
" + ] } }