From 8261dedec9b6bbe1e88cb950fdcbace9fcb2247e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Wed, 15 Aug 2018 21:36:08 +0200
Subject: [PATCH] Split fossil-energy in coal resp oil_gas

---
 coal.json    | 35 ++++++++++++++++++++++++++++++
 index.json   |  5 ++++-
 oil_gas.json | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 99 insertions(+), 1 deletion(-)
 create mode 100644 coal.json
 create mode 100644 oil_gas.json

diff --git a/coal.json b/coal.json
new file mode 100644
index 0000000..1ac92b1
--- /dev/null
+++ b/coal.json
@@ -0,0 +1,35 @@
+{
+    "type": "overpass",
+    "name": {
+        "de": "Kohle",
+        "en": "Coal"
+    },
+    "query": {
+        "11": [
+            "(",
+            "node[landuse~\"^(quarry)$\"][resource~\"^(|.*;)coal(|;.*)$\"];",
+            "way[landuse~\"^(quarry)$\"][resource~\"^(|.*;)coal(|;.*)$\"];",
+            "relation[landuse~\"^(quarry)$\"][resource~\"^(|.*;)coal(|;.*)$\"];",
+            "node[man_made~\"^(mineshaft)$\"][resource~\"^(|.*;)coal(|;.*)$\"];",
+            "way[man_made~\"^(mineshaft)$\"][resource~\"^(|.*;)coal(|;.*)$\"];",
+            "way[man_made~\"^(pipeline|goods_conveyor)$\"][substance~\"^(|.*;)(coal)(|;.*)$\"];",
+            "relation[man_made~\"^(pipeline|goods_conveyor)$\"][substance~\"^(|.*;)(coal)(|;.*)$\"];",
+            "node[power~\"^(plant)$\"][\"generator:source\"~\"^(|.*;)(coal)(|;.*)$\"];",
+            "way[power~\"^(plant)$\"][\"generator:source\"~\"^(|.*;)(coal)(|;.*)$\"];",
+            "relation[power~\"^(plant)$\"][\"generator:source\"~\"^(|.*;)(coal)(|;.*)$\"];",
+            ")"
+        ]
+    },
+    "feature": {
+        "description": [
+            "{% if tags.man_made == 'pipeline' %}",
+            "{{ tagTrans('man_made', 'pipeline') }} ({{ tagTrans('substance', tags.substance) }})",
+            "{% elseif tags.man_made %}",
+            "{{ tagTrans('man_made', tags.man_made) }}",
+            "{% elseif tags.landuse == 'industrial' %}",
+            "{{ tagTrans('landuse', tags.landuse) }} ({{ tagTrans('industrial', tags.industrial) }})",
+            "{% endif %}"
+        ],
+        "markerSymbol": null
+    }
+}
diff --git a/index.json b/index.json
index acb6252..ec3dece 100644
--- a/index.json
+++ b/index.json
@@ -246,7 +246,10 @@
                             "id": "electric_power"
                         },
                         {
-                            "id": "fossil-energy"
+                            "id": "coal"
+                        },
+                        {
+                            "id": "oil_gas"
                         }
                     ]
                 },
diff --git a/oil_gas.json b/oil_gas.json
new file mode 100644
index 0000000..6ce7d9a
--- /dev/null
+++ b/oil_gas.json
@@ -0,0 +1,60 @@
+{
+    "type": "overpass",
+    "name": {
+        "de": "Erdgas",
+        "en": "Natural gas"
+    },
+    "query": {
+        "11": [
+            "(",
+            "way[man_made~\"^(pipeline|goods_conveyor)$\"][substance~\"^(|.*;)(oil|gas|lng|cng|multiphase)(|;.*)$\"];",
+            "relation[man_made~\"^(pipeline|goods_conveyor)$\"][substance~\"^(|.*;)(oil|gas|lng|cng|multiphase)(|;.*)$\"];",
+            "node[landuse=industrial][industrial~\"^(|.*;)(refinery)(|;.*)$\"];",
+            "way[landuse=industrial][industrial~\"^(|.*;)(refinery)(|;.*)$\"];",
+            "relation[landuse=industrial][industrial~\"^(|.*;)(refinery)(|;.*)$\"];",
+            "way[waterway=offshore_field];",
+            "relation[waterway=offshore_field];",
+            "node[man_made~\"^(offshore_platform)$\"];",
+            "way[man_made~\"^(offshore_platform)$\"];",
+            "relation[man_made~\"^(offshore_platform)$\"];",
+            "node[power~\"^(plant)$\"][\"generator:source\"~\"^(|.*;)(oil|gas|diesel|gasoline)(|;.*)$\"];",
+            "way[power~\"^(plant)$\"][\"generator:source\"~\"^(|.*;)(oil|gas|diesel|gasoline)(|;.*)$\"];",
+            "relation[power~\"^(plant)$\"][\"generator:source\"~\"^(|.*;)(oil|gas|diesel|gasoline)(|;.*)$\"];",
+            ")"
+        ],
+        "13": [
+          "(",
+            "way[man_made~\"^(pipeline|goods_conveyor)$\"][substance~\"^(|.*;)(oil|gas|lng|cng|multiphase)(|;.*)$\"];",
+            "relation[man_made~\"^(pipeline|goods_conveyor)$\"][substance~\"^(|.*;)(oil|gas|lng|cng|multiphase)(|;.*)$\"];",
+            "node[landuse=industrial][industrial~\"^(|.*;)(oil|gas|lng|cng|multiphase|refinery|oil_refinery)(|;.*)$\"];",
+            "way[landuse=industrial][industrial~\"^(|.*;)(oil|gas|lng|cng|multiphase|refinery|oil_refinery)(|;.*)$\"];",
+            "relation[landuse=industrial][industrial~\"^(|.*;)(oil|gas|lng|cng|multiphase|refinery|oil_refinery)(|;.*)$\"];",
+            "way[waterway=offshore_field];",
+            "relation[waterway=offshore_field];",
+            "node[man_made~\"^(petroleum_well|offshore_platform|gasometer|oil_tank|gas_cavern)$\"];",
+            "node[man_made~\"^(storage_tank)$\"][contents~\"^(oil|gas|lng|cng|multiphase)$\"];",
+            "way[man_made~\"^(petroleum_well|offshore_platform|gasometer|oil_tank|gas_cavern)$\"];",
+            "way[man_made~\"^(storage_tank)$\"][contents~\"^(oil|gas|lng|cng|multiphase)(|;.*)$\"];",
+            "relation[man_made~\"^(petroleum_well|offshore_platform|gasometer|oil_tank|gas_cavern)(|;.*)$\"];",
+            "relation[man_made~\"^(storage_tank)$\"][contents~\"^(|.*;)(oil|gas|lng|cng|multiphase)(|;.*)$\"];",
+            "node[power~\"^(plant|generator)$\"][\"generator:source\"~\"^(|.*;)(oil|gas|diesel|gasoline)(|;.*)$\"];",
+            "way[power~\"^(plant|generator)$\"][\"generator:source\"~\"^(|.*;)(oil|gas|diesel|gasoline)(|;.*)$\"];",
+            "relation[power~\"^(plant|generator)$\"][\"generator:source\"~\"^(|.*;)(oil|gas|diesel|gasoline)(|;.*)$\"];",
+            ")"
+        ]
+    },
+    "feature": {
+        "description": [
+            "{% if tags.man_made == 'pipeline' %}",
+            "{{ tagTrans('man_made', 'pipeline') }} ({{ tagTrans('substance', tags.substance) }})",
+            "{% elseif tags.man_made %}",
+            "{{ tagTrans('man_made', tags.man_made) }}",
+            "{% elseif tags.landuse == 'industrial' %}",
+            "{{ tagTrans('landuse', tags.landuse) }} ({{ tagTrans('industrial', tags.industrial) }})",
+            "{% elseif tags.waterway == 'offshore_field' %}",
+            "{{ tagTrans('waterway', tags.waterway) }}",
+            "{% endif %}"
+        ],
+        "markerSymbol": null
+    }
+}