From 314f8f20168e3b680ba31b86b59114bc12668de1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Sun, 31 May 2020 07:11:21 +0200
Subject: [PATCH 1/6] construction: instead of e.g. highway=construction, print
 value of construction

---
 construction.json | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/construction.json b/construction.json
index 73495f7..289d2dc 100644
--- a/construction.json
+++ b/construction.json
@@ -30,7 +30,10 @@
         "pre": [
             "{% if tags.highway == 'construction' %}",
             "{% set key = 'highway' %}",
-            "{% set value = tags.highway %}",
+            "{% set value = tags.construction %}",
+            "{% elseif tags.landuse == 'construction' and tags.construction %}",
+            "{% set key = 'landuse' %}",
+            "{% set value = tags.construction %}",
             "{% else %}",
             "{% set key = 'landuse' %}",
             "{% set value = tags.landuse %}",

From 5057aa26e96e0b98fb1aca48f5dbff7e7c7733a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Sun, 31 May 2020 07:16:17 +0200
Subject: [PATCH 2/6] Developments: split planning from construction, create
 new tree under infrastructure

---
 construction.json |  8 ++------
 index.json        | 14 +++++++++++++-
 planning.json     | 20 ++++++++++++++++++++
 3 files changed, 35 insertions(+), 7 deletions(-)
 create mode 100644 planning.json

diff --git a/construction.json b/construction.json
index 289d2dc..617eee2 100644
--- a/construction.json
+++ b/construction.json
@@ -17,12 +17,8 @@
     "query": {
         "13": [
             "(",
-            "node[landuse~\"^(brownfield|greenfield|construction|)$\"];",
-            "way[landuse~\"^(brownfield|greenfield|construction|)$\"];",
-            "relation[landuse~\"^(brownfield|greenfield|construction|)$\"];",
-            "node[highway~\"^(construction)$\"];",
-            "way[highway~\"^(construction)$\"];",
-            "relation[highway~\"^(construction)$\"];",
+            "nwr[landuse~\"^(construction)$\"];",
+            "nwr[highway~\"^(construction)$\"];",
             ")"
         ]
     },
diff --git a/index.json b/index.json
index 4f651ef..53e4b8a 100644
--- a/index.json
+++ b/index.json
@@ -266,7 +266,19 @@
                     "id": "agriculture"
                 },
                 {
-                    "id": "construction"
+                    "id": "developments",
+                    "type": "index",
+                    "name": {
+                        "en": "Planning and Construction"
+                    },
+                    "subCategories": [
+                        {
+                            "id": "construction"
+                        },
+                        {
+                            "id": "planning"
+                        }
+                    ]
                 },
                 {
                     "id": "military"
diff --git a/planning.json b/planning.json
new file mode 100644
index 0000000..8e961e1
--- /dev/null
+++ b/planning.json
@@ -0,0 +1,20 @@
+{
+    "type": "overpass",
+    "name": {
+        "en": "Planning",
+    },
+    "query": {
+        "13": [
+            "(",
+            "nwr[landuse~\"^(brownfield|greenfield)$\"];",
+            ")"
+        ]
+    },
+    "feature": {
+        "pre": [
+            "{% set key = 'landuse' %}",
+            "{% set value = tags.landuse %}"
+        ],
+        "description": "{{ tagTrans(key, value) }} {{ key}} {{ value }}"
+    }
+}

From d0fe82b23efcc06e8924aa33e712fcdcb05a6a96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Sun, 31 May 2020 07:41:05 +0200
Subject: [PATCH 3/6] construction: include railway, building, construction:*=*

---
 construction.json | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/construction.json b/construction.json
index 617eee2..1243ca1 100644
--- a/construction.json
+++ b/construction.json
@@ -19,20 +19,36 @@
             "(",
             "nwr[landuse~\"^(construction)$\"];",
             "nwr[highway~\"^(construction)$\"];",
+            "nwr[railway~\"^(construction)$\"];",
+            "nwr[building~\"^(construction)$\"];",
+            "nwr[highway~\"^(construction)$\"];",
+            "nwr[~\"^construction:\"~\".\"];",
             ")"
         ]
     },
     "feature": {
         "pre": [
+            "{% set key = null %}{% set value = null %}",
             "{% if tags.highway == 'construction' %}",
             "{% set key = 'highway' %}",
-            "{% set value = tags.construction %}",
-            "{% elseif tags.landuse == 'construction' and tags.construction %}",
+            "{% set value = tags.construction|default('construction') %}",
+            "{% elseif tags.railway == 'construction' %}",
+            "{% set key = 'railway' %}",
+            "{% set value = tags.construction|default('construction') %}",
+            "{% elseif tags.building == 'construction' %}",
+            "{% set key = 'building' %}",
+            "{% set value = tags.construction|default('construction') %}",
+            "{% elseif tags.landuse == 'construction' %}",
             "{% set key = 'landuse' %}",
-            "{% set value = tags.construction %}",
+            "{% set value = tags.construction|default('construction') %}",
             "{% else %}",
-            "{% set key = 'landuse' %}",
-            "{% set value = tags.landuse %}",
+            "{% for k, v in tags %}",
+            "{% set m = k|matches('^construction:(.*)$') %}",
+            "{% if m %}",
+            "{% set key = m[1] %}",
+            "{% set value = v %}",
+            "{{ debug(key, value) }}",
+            "{% endif %}{% endfor %}",
             "{% endif %}"
         ],
         "description": "{{ tagTrans(key, value) }}"

From d194b16814f34c4450e124cb18d67281e7e2e387 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Mon, 1 Jun 2020 23:05:15 +0200
Subject: [PATCH 4/6] Construction: add proposals and developable_areas

---
 planning.json => developable_areas.json |  4 +--
 index.json                              |  5 ++-
 proposals.json                          | 45 +++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 3 deletions(-)
 rename planning.json => developable_areas.json (76%)
 create mode 100644 proposals.json

diff --git a/planning.json b/developable_areas.json
similarity index 76%
rename from planning.json
rename to developable_areas.json
index 8e961e1..8f67600 100644
--- a/planning.json
+++ b/developable_areas.json
@@ -1,7 +1,7 @@
 {
     "type": "overpass",
     "name": {
-        "en": "Planning",
+        "en": "Developable Areas"
     },
     "query": {
         "13": [
@@ -15,6 +15,6 @@
             "{% set key = 'landuse' %}",
             "{% set value = tags.landuse %}"
         ],
-        "description": "{{ tagTrans(key, value) }} {{ key}} {{ value }}"
+        "description": "{{ tagTrans(key, value) }}"
     }
 }
diff --git a/index.json b/index.json
index 53e4b8a..e2c2824 100644
--- a/index.json
+++ b/index.json
@@ -276,7 +276,10 @@
                             "id": "construction"
                         },
                         {
-                            "id": "planning"
+                            "id": "proposals"
+                        },
+                        {
+                            "id": "developable_areas"
                         }
                     ]
                 },
diff --git a/proposals.json b/proposals.json
new file mode 100644
index 0000000..a5d0517
--- /dev/null
+++ b/proposals.json
@@ -0,0 +1,45 @@
+{
+    "type": "overpass",
+    "name": {
+        "en": "Proposals"
+    },
+    "query": {
+        "13": [
+            "(",
+            "nwr[landuse~\"^(proposed)$\"];",
+            "nwr[highway~\"^(proposed)$\"];",
+            "nwr[railway~\"^(proposed)$\"];",
+            "nwr[building~\"^(proposed)$\"];",
+            "nwr[highway~\"^(proposed)$\"];",
+            "nwr[~\"^proposed:\"~\".\"];",
+            ")"
+        ]
+    },
+    "feature": {
+        "pre": [
+            "{% set key = null %}{% set value = null %}",
+            "{% if tags.highway == 'proposed' %}",
+            "{% set key = 'highway' %}",
+            "{% set value = tags.proposed|default('construction') %}",
+            "{% elseif tags.railway == 'proposed' %}",
+            "{% set key = 'railway' %}",
+            "{% set value = tags.proposed|default('construction') %}",
+            "{% elseif tags.building == 'proposed' %}",
+            "{% set key = 'building' %}",
+            "{% set value = tags.proposed|default('construction') %}",
+            "{% elseif tags.landuse == 'proposed' %}",
+            "{% set key = 'landuse' %}",
+            "{% set value = tags.proposed|default('construction') %}",
+            "{% else %}",
+            "{% for k, v in tags %}",
+            "{% set m = k|matches('^proposed:(.*)$') %}",
+            "{% if m %}",
+            "{% set key = m[1] %}",
+            "{% set value = v %}",
+            "{{ debug(key, value) }}",
+            "{% endif %}{% endfor %}",
+            "{% endif %}"
+        ],
+        "description": "{{ tagTrans(key, value) }}"
+    }
+}

From a1f8ed7dc2868b96a73a325e0d16a6b54c9e1475 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Tue, 2 Jun 2020 09:12:11 +0200
Subject: [PATCH 5/6] Developable Areas: colors, map key

---
 developable_areas.json | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/developable_areas.json b/developable_areas.json
index 8f67600..6b92dcc 100644
--- a/developable_areas.json
+++ b/developable_areas.json
@@ -15,6 +15,25 @@
             "{% set key = 'landuse' %}",
             "{% set value = tags.landuse %}"
         ],
+        "style": {
+            "color": "{{ const[value] }}"
+        },
+        "markerSymbol": "{{ markerPointer({fillColor:const[value]})|raw }}",
+        "listMarkerSymbol": "{{ markerCircle({fillColor:const[value]})|raw }}",
         "description": "{{ tagTrans(key, value) }}"
+    },
+    "info": [
+        "<table>",
+        "{% for value, color in const %}",
+        "  <tr>",
+        "    <td>{{ markerCircle({fillColor: color})|raw }}</td>",
+        "    <td>{{ tagTrans('landuse', value) }}</td>",
+        "  </tr>",
+        "{% endfor %}",
+        "</table>"
+    ],
+    "const": {
+        "brownfield": "#c3701f",
+        "greenfield": "#009800"
     }
 }

From b0cb94c2a433f4077e2bbe9d975b6fefd52d19cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Tue, 16 Jun 2020 11:07:19 +0200
Subject: [PATCH 6/6] Proposals: bugfix

---
 proposals.json | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/proposals.json b/proposals.json
index a5d0517..3445290 100644
--- a/proposals.json
+++ b/proposals.json
@@ -20,16 +20,16 @@
             "{% set key = null %}{% set value = null %}",
             "{% if tags.highway == 'proposed' %}",
             "{% set key = 'highway' %}",
-            "{% set value = tags.proposed|default('construction') %}",
+            "{% set value = tags.proposed|default('proposed') %}",
             "{% elseif tags.railway == 'proposed' %}",
             "{% set key = 'railway' %}",
-            "{% set value = tags.proposed|default('construction') %}",
+            "{% set value = tags.proposed|default('proposed') %}",
             "{% elseif tags.building == 'proposed' %}",
             "{% set key = 'building' %}",
-            "{% set value = tags.proposed|default('construction') %}",
+            "{% set value = tags.proposed|default('proposed') %}",
             "{% elseif tags.landuse == 'proposed' %}",
             "{% set key = 'landuse' %}",
-            "{% set value = tags.proposed|default('construction') %}",
+            "{% set value = tags.proposed|default('proposed') %}",
             "{% else %}",
             "{% for k, v in tags %}",
             "{% set m = k|matches('^proposed:(.*)$') %}",