From 718b0d8def6cbeb5afa488d788c96e32176d8921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= 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 3a81c7e..61c8e0c 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 f120f91..2db89e9 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 3930803..d3b5233 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 a8f315c..0000000 --- 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 1be7da7..c08590a 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 bdd003d..b5f3e2c 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 0000000..1f36afd --- /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
\n{{ keyTrans('recycling_type') }}: {{ tagTrans('recycling_type', tags.recycling_type) }}\n{% endif %}" + } +}