From 94dd738f5420bdc38fb046f5c4f3c989d2c022df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?=
 <plepe@noreply.openstreetbrowser.org>
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 656e473a792ca94533e3a7b77929b8a0a57201a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?=
 <plepe@noreply.openstreetbrowser.org>
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 %}<br/>"
+        ]
     }
 }

From 006d12dd5d308b0eb3eda2879f157f5a5c29ce63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?=
 <plepe@noreply.openstreetbrowser.org>
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 %}<br/>"
-        ]
+        "body": "{% if tags.via_ferrata_scale %}<b>{{ keyTrans('via_ferrata_scale') }}: </b>{{ tags.via_ferrata_scale }}{% endif %}<br/>"
     }
 }

From 9b657d9e44b6ae0af8153a14b26779d6470450a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
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 a89ef20c286caf98cf65059279448a1c02ffc6d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
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 %}<b>{{ keyTrans('via_ferrata_scale') }}: </b>{{ tags.via_ferrata_scale }}{% endif %}<br/>"
+        "body": [
+            "<ul>",
+            "  {% if attribute(tags, 'ele') %}<li><b>{{ keyTrans('ele') }}: </b>{{ tags.ele }}m</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:length') %}<li><b>{{ keyTrans('climbing:length') }}: </b>{{ attribute(tags, 'climbing:length') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:length:min') or attribute(tags, 'climbing:length:max') %}<li><b>{{ keyTrans('climbing:length') }}: </b>{{ attribute(tags, 'climbing:length:min') }} - {{ attribute(tags, 'climbing:length:max') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:grade:uiaa') or attribute(tags, 'climbing:grade:uiaa:min') or attribute(tags, 'climbing:grade:uiaa:max ') %}<li><b>{{ keyTrans('climbing:grade:uiaa') }}: </b>{% 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 %}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:grade:UIAA') or attribute(tags, 'climbing:grade:UIAA:min') or attribute(tags, 'climbing:grade:UIAA:max ') %}<li><b>{{ keyTrans('climbing:grade:uiaa') }}: </b>{% 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 %}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:grade:french') or attribute(tags, 'climbing:grade:french:min') or attribute(tags, 'climbing:grade:french:max ') %}<li><b>{{ keyTrans('climbing:grade:french') }}: </b>{% 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 %}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:grade:saxon') or attribute(tags, 'climbing:grade:saxon:min') or attribute(tags, 'climbing:grade:saxon:max ') %}<li><b>{{ keyTrans('climbing:grade:saxon') }}: </b>{% 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 %}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:grade:polish') or attribute(tags, 'climbing:grade:polish:min') or attribute(tags, 'climbing:grade:polish:max ') %}<li><b>{{ keyTrans('climbing:grade:polish') }}: </b>{% 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 %}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:bolted') %}<li><b>{{ keyTrans('climbing:bolted') }}: </b>{{ attribute(tags, 'climbing:bolted') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:orientation') %}<li><b>{{ keyTrans('climbing:orientation') }}: </b>{{ tagTransList('direction', attribute(tags, 'climbing:orientation')) }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:quality') %}<li><b>{{ keyTrans('climbing:quality') }}: </b>{{ attribute(tags, 'climbing:quality') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:rock') %}<li><b>{{ keyTrans('climbing:rock') }}: </b>{{ tagTransList('material', attribute(tags, 'climbing:rock')) }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:routes') %}<li><b>{{ keyTrans('climbing:routes') }}: </b>{{ attribute(tags, 'climbing:routes') }}</li>{% endif %}",
+            "  {% if tags.via_ferrata_scale %}<li><b>{{ keyTrans('via_ferrata_scale') }}: </b>{{ tags.via_ferrata_scale }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:boulder') %}<li><b>{{ keyTrans('climbing:boulder') }}: </b>{{ attribute(tags, 'climbing:boulder') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:sport') %}<li><b>{{ keyTrans('climbing:sport') }}: </b>{{ attribute(tags, 'climbing:sport') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:speed') %}<li><b>{{ keyTrans('climbing:speed') }}: </b>{{ attribute(tags, 'climbing:speed') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:toprope') %}<li><b>{{ keyTrans('climbing:toprope') }}: </b>{{ attribute(tags, 'climbing:toprope') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:trad') %}<li><b>{{ keyTrans('climbing:trad') }}: </b>{{ attribute(tags, 'climbing:trad') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:multipitch') %}<li><b>{{ keyTrans('climbing:multipitch') }}: </b>{{ attribute(tags, 'climbing:multipitch') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:ice') %}<li><b>{{ keyTrans('climbing:ice') }}: </b>{{ attribute(tags, 'climbing:ice') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:mixed') %}<li><b>{{ keyTrans('climbing:mixed') }}: </b>{{ attribute(tags, 'climbing:mixed') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:deepwater') %}<li><b>{{ keyTrans('climbing:deepwater') }}: </b>{{ attribute(tags, 'climbing:deepwater') }}</li>{% endif %}",
+            "  {% if attribute(tags, 'climbing:summit_log') %}<li><b>{{ keyTrans('climbing:quality') }}: </b>{{ attribute(tags, 'climbing:quality') }}</li>{% endif %}",
+            "</ul>"
+        ]
     }
 }