From 760f53380b012ae250f80191e0c23a7bbca834b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sat, 15 Jul 2017 21:36:44 +0200 Subject: [PATCH] Power category --- index.json | 9 +++++++++ power.json | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 power.json diff --git a/index.json b/index.json index 15cd1a82..141aa0be 100644 --- a/index.json +++ b/index.json @@ -64,6 +64,15 @@ } ] }, + { + "id": "agriculture_industry", + "type": "index", + "subCategories": [ + { + "id": "power" + } + ] + }, { "id": "places" } diff --git a/power.json b/power.json new file mode 100644 index 00000000..d61f3c6c --- /dev/null +++ b/power.json @@ -0,0 +1,15 @@ +{ + "type": "overpass", + "query": { + "11": "(node[power~'^(generator)$'];way[power~'^(generator)$'];relation[power~'^(generator)$'];)", + "13": "(node[power~'^(generator|station)$'];way[power~'^(generator|station)$'];relation[power~'^(generator|station)$'];)", + "16": "(node[power~'^(generator|station|sub_station|transformer)$'];way[power~'^(generator|station|sub_station|transformer)$'];relation[power~'^(generator|station|sub_station|transformer)$'];)" + }, + "minZoom": 11, + "feature": { + "markerSign": "", + "body": "{{ tagTrans('power', tags.power) }}\n{% set x='generator:source' %}{% if tags[x] %}
{{ tagTrans('generator:source') }}: {{ tagTransList('generator:source', tags[x]) }}{% endif %}\n{% set x='generator:method' %}{% if tags[x] %}
{{ tagTrans('generator:method') }}: {{ tagTransList('generator:method', tags[x]) }}{% endif %}\n{% set x='generator:type' %}{% if tags[x] %}
{{ tagTransList('generator:type') }}: {{ tagTrans('generator:type', tags[x]) }}{% endif %}", + "description": "{{ tagTrans('power', tags.power) }}{% set x='generator:source' %}{% if tags[x] %}, {{ tagTransList('generator:source', tags[x]) }}{% endif %}", + "priority": "{% if tags.power == 'generator' %}0{% elseif tags.power == 'station' %}1{% else %}2{% endif %}" + } +}