From 718b0d8def6cbeb5afa488d788c96e32176d8921 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Sun, 6 Aug 2017 14:02:38 +0200
Subject: [PATCH] Categories in 'agriculture_industry'

---
 agriculture.json  |  8 ++++++++
 construction.json |  9 +++++++++
 index.json        | 15 +++++++++++++++
 landfill.json     | 13 -------------
 military.json     | 10 ++++++++++
 resources.json    |  9 +++++++++
 waste.json        | 23 +++++++++++++++++++++++
 7 files changed, 74 insertions(+), 13 deletions(-)
 delete mode 100644 landfill.json
 create mode 100644 waste.json

diff --git a/agriculture.json b/agriculture.json
index 3a81c7e86..61c8e0c8b 100644
--- a/agriculture.json
+++ b/agriculture.json
@@ -1,4 +1,5 @@
 {
+    "type": "overpass",
     "name": {
         "ast": "Agricultura",
         "cs": "Zemědělství",
@@ -13,5 +14,12 @@
         "nl": "Landbouw",
         "ro": "Agricultura",
         "ru": "Сельское хозяйство"
+    },
+    "query": {
+        "13": "(\nnode[landuse~\"^(allotments|farm|farmland|farmyard|greenhouse_horticulture|orchard|vineyard)$\"];\nway[landuse~\"^(allotments|farm|farmland|farmyard|greenhouse_horticulture|orchard|vineyard)$\"];\nrelation[landuse~\"^(allotments|farm|farmland|farmyard|greenhouse_horticulture|orchard|vineyard)$\"];\n)"
+    },
+    "feature": {
+        "description": "{{ tagTrans('landuse', tags.landuse) }}",
+        "body": "{{ tagTrans('landuse', tags.landuse) }}"
     }
 }
diff --git a/construction.json b/construction.json
index f120f9192..2db89e916 100644
--- a/construction.json
+++ b/construction.json
@@ -1,4 +1,5 @@
 {
+    "type": "overpass",
     "name": {
         "ast": "Sitios d'obres",
         "cs": "Staveniště",
@@ -9,5 +10,13 @@
         "ja": "工事中",
         "nl": "Bouwterrein",
         "ru": "Места строительства"
+    },
+    "query": {
+        "13": "(\nnode[landuse~\"^(brownfield|greenfield|construction|)$\"];\nway[landuse~\"^(brownfield|greenfield|construction|)$\"];\nrelation[landuse~\"^(brownfield|greenfield|construction|)$\"];\nnode[highway~\"^(construction)$\"];\nway[highway~\"^(construction)$\"];\nrelation[highway~\"^(construction)$\"];\n)"
+    },
+    "feature": {
+        "pre": "{% if tags.highway == 'construction' %}\n{% set key = 'highway' %}\n{% set value = tags.highway %}\n{% else %}\n{% set key = 'landuse' %}\n{% set value = tags.landuse %}\n{% endif %}",
+        "description": "{{ tagTrans(key, value) }}",
+        "body": "{{ tagTrans(key, value) }}"
     }
 }
diff --git a/index.json b/index.json
index 3930803ab..d3b523301 100644
--- a/index.json
+++ b/index.json
@@ -198,12 +198,27 @@
             "id": "agriculture_industry",
             "type": "index",
             "subCategories": [
+                {
+                    "id": "agriculture"
+                },
+                {
+                    "id": "construction"
+                },
+                {
+                    "id": "military"
+                },
                 {
                     "id": "power"
                 },
                 {
                     "id": "railway"
                 },
+                {
+                    "id": "resources"
+                },
+                {
+                    "id": "waste"
+                },
                 {
                     "id": "works"
                 }
diff --git a/landfill.json b/landfill.json
deleted file mode 100644
index a8f315c5d..000000000
--- a/landfill.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-    "name": {
-        "ast": "Basures",
-        "cs": "Nakládání s odpady",
-        "de": "Entsorgung",
-        "en": "Disposal",
-        "fr": "Rebuts",
-        "it": "Smaltimento",
-        "ja": "処理場",
-        "nl": "Afvalverwijdering",
-        "ru": "Переработка отходов"
-    }
-}
diff --git a/military.json b/military.json
index 1be7da715..c08590a58 100644
--- a/military.json
+++ b/military.json
@@ -1,4 +1,5 @@
 {
+    "type": "overpass",
     "name": {
         "ast": "Militar",
         "cs": "Vojenské",
@@ -12,5 +13,14 @@
         "nl": "Militair",
         "ro": "Militar",
         "ru": "Вооружённые силы"
+    },
+    "query": {
+        "11": "(\nnode[military~\"^(airfield|danger_area)$\"];\nnode[landuse=military];\nway[military~\"^(airfield|danger_area)$\"];\nway[landuse=military];\nrelation[military~\"^(airfield|danger_area)$\"];\nrelation[landuse=military];\n)",
+        "14": "(\nnode[military];\nnode[landuse=military];\nway[military];\nway[landuse=military];\nrelation[military];\nrelation[landuse=military];\n)"
+    },
+    "feature": {
+        "pre": "{% if tags.military %}\n  {% set key = 'military' %}\n  {% set value = tags.military %}\n{% else %}\n  {% set key = 'landuse' %}\n  {% set value = tags.landuse %}\n{% endif %}",
+        "description": "{{ tagTrans(key, value) }}",
+        "body": "{{ tagTrans(key, value) }}"
     }
 }
diff --git a/resources.json b/resources.json
index bdd003ded..b5f3e2cf4 100644
--- a/resources.json
+++ b/resources.json
@@ -1,4 +1,5 @@
 {
+    "type": "overpass",
     "name": {
         "ast": "Estraición de recursos",
         "cs": "Těžba surovin",
@@ -8,5 +9,13 @@
         "it": "Areee estrattive",
         "nl": "Grondstoffenwinning",
         "ru": "Добыча ресурсов"
+    },
+    "query": {
+        "11": "(\nnode[landuse~\"^(quarry|salt_pond)$\"];\nnode[man_made~\"^(mineshaft)$\"];\nway[landuse~\"^(quarry|salt_pond)$\"];\nway[man_made~\"^(mineshaft)$\"];\nrelation[landuse~\"^(quarry|salt_pond)$\"];\nrelation[man_made~\"^(mineshaft)$\"];\n)"
+    },
+    "feature": {
+        "pre": "{% if tags.landuse in [ 'quarry', 'salt_pond' ] %}\n  {% set key = 'landuse' %}\n  {% set value = tags.landuse %}\n{% else %}\n  {% set key = 'man_made' %}\n  {% set value = tags.man_made %}\n{% endif %}",
+        "description": "{{ tagTrans(key, value) }}",
+        "body": "{{ tagTrans(key, value) }}"
     }
 }
diff --git a/waste.json b/waste.json
new file mode 100644
index 000000000..1f36afda2
--- /dev/null
+++ b/waste.json
@@ -0,0 +1,23 @@
+{
+    "type": "overpass",
+    "name": {
+        "ast": "Basures",
+        "cs": "Nakládání s odpady",
+        "de": "Entsorgung",
+        "en": "Disposal",
+        "fr": "Rebuts",
+        "it": "Smaltimento",
+        "ja": "処理場",
+        "nl": "Afvalverwijdering",
+        "ru": "Переработка отходов"
+    },
+    "query": {
+        "13": "(\nnode[landuse=landfill];\nnode[man_made=wastewater_plant];\nnode[amenity=recycling][recycling_type=centre];\nway[landuse=landfill];\nway[man_made=wastewater_plant];\nway[amenity=recycling][recycling_type=centre];\nrelation[landuse=landfill];\nrelation[man_made=wastewater_plant];\nrelation[amenity=recycling][recycling_type=centre];\n)",
+        "15": "(\nnode[landuse=landfill];\nnode[man_made=wastewater_plant];\nnode[amenity=recycling];\nway[landuse=landfill];\nway[man_made=wastewater_plant];\nway[amenity=recycling];\nrelation[landuse=landfill];\nrelation[man_made=wastewater_plant];\nrelation[amenity=recycling];\n)"
+    },
+    "feature": {
+        "pre": "{% if tags.landuse == 'landfill' %}\n  {% set key = 'landuse' %}\n  {% set value = tags.landuse %}\n{% elseif tags.man_made == 'wastewater_plant' %}\n  {% set key = 'man_made' %}\n  {% set value = tags.man_made %}\n{% elseif tags.amenity == 'recycling' %}\n  {% set key = 'amenity' %}\n  {% set value = tags.amenity %}\n{% endif %}",
+        "description": "{{ tagTrans(key, value) }}",
+        "body": "{{ tagTrans(key, value) }}\n{% if tags.recycling_type %}\n<br/>\n{{ keyTrans('recycling_type') }}: {{ tagTrans('recycling_type', tags.recycling_type) }}\n{% endif %}"
+    }
+}