From 688708581d26c5933a15232d7a621635062dcb86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= 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 065a582c3a6c89f6f1f9bc169b0ab73593db9765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= 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 c4bbd7d5577d01be0c328fa615c06836c1a64ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= 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 b07d721e22d5407bee39d708da787dcbc49e02e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= 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 16eef2884f2ef3a7ad3b8402a8a01702197a62b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= 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": [ + "", + "{% for value, color in const %}", + " ", + " ", + " ", + " ", + "{% endfor %}", + "
{{ markerCircle({fillColor: color})|raw }}{{ tagTrans('landuse', value) }}
" + ], + "const": { + "brownfield": "#c3701f", + "greenfield": "#009800" } } From 14a5096b67870f4fe748a534be34fd85f734df18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= 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:(.*)$') %}",