diff --git a/construction.json b/construction.json index 73495f7..1243ca1 100644 --- a/construction.json +++ b/construction.json @@ -17,23 +17,38 @@ "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)$\"];", + "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.highway %}", - "{% else %}", + "{% 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.landuse %}", + "{% set value = tags.construction|default('construction') %}", + "{% else %}", + "{% 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) }}" diff --git a/developable_areas.json b/developable_areas.json new file mode 100644 index 0000000..6b92dcc --- /dev/null +++ b/developable_areas.json @@ -0,0 +1,39 @@ +{ + "type": "overpass", + "name": { + "en": "Developable Areas" + }, + "query": { + "13": [ + "(", + "nwr[landuse~\"^(brownfield|greenfield)$\"];", + ")" + ] + }, + "feature": { + "pre": [ + "{% 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" + } +} diff --git a/index.json b/index.json index 4f651ef..e2c2824 100644 --- a/index.json +++ b/index.json @@ -266,7 +266,22 @@ "id": "agriculture" }, { - "id": "construction" + "id": "developments", + "type": "index", + "name": { + "en": "Planning and Construction" + }, + "subCategories": [ + { + "id": "construction" + }, + { + "id": "proposals" + }, + { + "id": "developable_areas" + } + ] }, { "id": "military" diff --git a/proposals.json b/proposals.json new file mode 100644 index 0000000..3445290 --- /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('proposed') %}", + "{% elseif tags.railway == 'proposed' %}", + "{% set key = 'railway' %}", + "{% set value = tags.proposed|default('proposed') %}", + "{% elseif tags.building == 'proposed' %}", + "{% set key = 'building' %}", + "{% set value = tags.proposed|default('proposed') %}", + "{% elseif tags.landuse == 'proposed' %}", + "{% set key = 'landuse' %}", + "{% set value = tags.proposed|default('proposed') %}", + "{% 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) }}" + } +}