Stephan Bösch-Plepelits
12 months ago
10 changed files with 501 additions and 602 deletions
-
27buildings-entrances.json
-
14buildings-entrances.yaml
-
40buildings-figure-ground.json
-
26buildings-figure-ground.yaml
-
127buildings-height.json
-
113buildings-height.yaml
-
165buildings-start_date.json
-
147buildings-start_date.yaml
-
243buildings-type.json
-
201buildings-type.yaml
@ -1,27 +0,0 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"de": "Eingänge", |
|||
"en": "Entrances", |
|||
"fr": "Entrées", |
|||
"pt-br": "Acessos" |
|||
}, |
|||
"query": { |
|||
"16": [ |
|||
"(", |
|||
" node[entrance];", |
|||
" node[building=entrance];", |
|||
")" |
|||
] |
|||
}, |
|||
"feature": { |
|||
"description": [ |
|||
"{% if tags.entrance == 'yes' or (not tags.entrance and tags.building == 'entrance') %}", |
|||
"{{ keyTrans('entrance') }}", |
|||
"{% else %}", |
|||
"{{ tagTrans('entrance', tags.entrance) }}", |
|||
"{% endif %}" |
|||
], |
|||
"styles": "" |
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
query: |
|||
16: |- |
|||
( |
|||
node[entrance]; |
|||
node[building=entrance]; |
|||
) |
|||
feature: |
|||
description: |- |
|||
{% if tags.entrance == 'yes' or (not tags.entrance and tags.building == 'entrance') %} |
|||
{{ keyTrans('entrance') }} |
|||
{% else %} |
|||
{{ tagTrans('entrance', tags.entrance) }} |
|||
{% endif %} |
|||
styles: '' |
@ -1,40 +0,0 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"de": "Schwarzplan", |
|||
"en": "Figure-ground diagram", |
|||
"fr": "Empreintes", |
|||
"pt-br": "Cheios e vazios" |
|||
}, |
|||
"query": { |
|||
"16": [ |
|||
"(", |
|||
" way[building];", |
|||
" relation[building];", |
|||
")" |
|||
] |
|||
}, |
|||
"feature": { |
|||
"markerSymbol": "", |
|||
"listMarkerSymbol": "{{ markerPolygon({fillColor: \"#000000\", fillOpacity: 1 })|raw }}", |
|||
"priority": [ |
|||
"{% set p = 100 %}", |
|||
"{% if tags.name %}{% set p = p - 10 %}{% endif %}", |
|||
"{% if tags.amenity %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.historic %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.culture %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.highway %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.railway %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.aeroway %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.amenity %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.tourism %}{% set p = p - 1 %}{% endif %}", |
|||
"{{ p }}" |
|||
], |
|||
"style": { |
|||
"width": "0", |
|||
"color": "#000000", |
|||
"fillColor": "#000000", |
|||
"fillOpacity": "1" |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
query: |
|||
16: |- |
|||
( |
|||
way[building]; |
|||
relation[building]; |
|||
) |
|||
feature: |
|||
markerSymbol: '' |
|||
listMarkerSymbol: '{{ markerPolygon({fillColor: "#000000", fillOpacity: 1 })|raw }}' |
|||
priority: |- |
|||
{% set p = 100 %} |
|||
{% if tags.name %}{% set p = p - 10 %}{% endif %} |
|||
{% if tags.amenity %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.historic %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.culture %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.highway %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.railway %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.aeroway %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.amenity %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.tourism %}{% set p = p - 1 %}{% endif %} |
|||
{{ p }} |
|||
style: |
|||
width: 0 |
|||
color: '#000000' |
|||
fillColor: '#000000' |
|||
fillOpacity: 1 |
@ -1,127 +0,0 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"de": "Gebäudehöhen", |
|||
"en": "Building height", |
|||
"fr": "Hauteur", |
|||
"pt-br": "Altura" |
|||
}, |
|||
"query": { |
|||
"16": [ |
|||
"(", |
|||
" way[building];", |
|||
" relation[building];", |
|||
")" |
|||
] |
|||
}, |
|||
"feature": { |
|||
"pre": [ |
|||
"{% if tags.height is defined %}", |
|||
"{% set approxHeight = tags.height %}", |
|||
"{% set m = tags.height|matches('(.*)\\s*(m|ft)$') %}", |
|||
"{% if m and m[2] == 'm' %}{% set approxHeight = m[1] %}{% endif %}", |
|||
"{% if m and m[2] == 'ft' %}{% set approxHeight = m[1] / 3.2808 %}{% endif %}", |
|||
"{% elseif attribute(tags, 'building:levels') is defined %}", |
|||
"{% set approxHeight = attribute(tags, 'building:levels') * 3.5 %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% if approxHeight <= 50 %}", |
|||
"{% set color = colorInterpolate(['green', 'red'], approxHeight / 50) %}", |
|||
"{% elseif approxHeight %}", |
|||
"{% set color = colorInterpolate(['red', 'yellow'], (approxHeight - 50) / 250) %} ", |
|||
"{% else %}", |
|||
"{% set color = '#7f7f7f' %}", |
|||
"{% endif %}" |
|||
], |
|||
"description": [ |
|||
"{% if tags.building == 'yes' and tags.military %}", |
|||
"{{ tagTrans('building', 'military') }}", |
|||
"{% elseif tags.building == 'yes' %}", |
|||
"{{ keyTrans('building') }}", |
|||
"{% else %}", |
|||
"{{ tagTransList('building', tags.building) }}", |
|||
"{% endif %}", |
|||
"{% if tags.building == 'construction' and tags.construction %}", |
|||
"({{ tagTransList('building', tags.construction) }})", |
|||
"{% endif %}", |
|||
"{% if tags.building in [ 'yes', 'military' ] and tags.military %}", |
|||
"({{ tagTransList('military', tags.military) }})", |
|||
"{% endif %}" |
|||
], |
|||
"details": [ |
|||
"{% if tags.height is defined %}", |
|||
" {% if tags.height|matches('(m|ft)$') %}{{ tags.height -}}", |
|||
" {% else %}{{ tags.height }} m", |
|||
" {%- endif -%}", |
|||
"{% endif -%}", |
|||
"", |
|||
"{%- if attribute(tags, 'building:levels') is defined -%}", |
|||
"{%- if tags.height is defined %}, {% endif %}", |
|||
"{{ attribute(tags, 'building:levels') }} {{ keyTrans('building:levels') }}", |
|||
"{% endif %}" |
|||
], |
|||
"markerSymbol": null, |
|||
"listMarkerSymbol": "{{ markerPolygon({\"fillColor\": color, \"fillOpacity\": 0.8, \"width\": 1, \"color\": \"#000000\" })|raw }}", |
|||
"priority": "{{ (approxHeight|default(0)) * -1 }}", |
|||
"style": { |
|||
"width": "1", |
|||
"color": "#000000", |
|||
"fillColor": "{{ color }}", |
|||
"fillOpacity": "1" |
|||
} |
|||
}, |
|||
"info": [ |
|||
"<div style='display: inline-block'>", |
|||
"{{ tagTrans('height') }}", |
|||
"<table>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\" }))|raw }}</td>", |
|||
" <td colspan>{{ trans('unknown') }}</td>", |
|||
" </tr>", |
|||
"{% for i in range(0, 50, 10) %}", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"height\": i }))|raw }}</td>", |
|||
" <td>{{ i }}m</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
"{% for i in range(100, 250, 50) %}", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"height\": i }))|raw }}</td>", |
|||
" <td>{{ i }}m</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"height\": \"300\" }))|raw }}</td>", |
|||
" <td>≥300m</td>", |
|||
" </tr>", |
|||
"</table>", |
|||
"</div>", |
|||
"", |
|||
"<div style='display: inline-block'>", |
|||
"{{ tagTrans('building:levels') }}", |
|||
"<table>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\" }))|raw }}</td>", |
|||
" <td colspan>{{ trans('unknown') }}</td>", |
|||
" </tr>", |
|||
"{% for i in range(0, 12, 3) %}", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"building:levels\": i }))|raw }}</td>", |
|||
" <td>{{ i }}</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
"{% for i in range(15, 84, 15) %}", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"building:levels\": i }))|raw }}</td>", |
|||
" <td>{{ i }}</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"building:levels\": \"85\" }))|raw }}</td>", |
|||
" <td>≥85</td>", |
|||
" </tr>", |
|||
"</table>", |
|||
"", |
|||
"</div>" |
|||
] |
|||
} |
@ -0,0 +1,113 @@ |
|||
query: |
|||
16: |- |
|||
( |
|||
way[building]; |
|||
relation[building]; |
|||
) |
|||
feature: |
|||
pre: |- |
|||
{% if tags.height is defined %} |
|||
{% set approxHeight = tags.height %} |
|||
{% set m = tags.height|matches('(.*)\s*(m|ft)$') %} |
|||
{% if m and m[2] == 'm' %}{% set approxHeight = m[1] %}{% endif %} |
|||
{% if m and m[2] == 'ft' %}{% set approxHeight = m[1] / 3.2808 %}{% endif %} |
|||
{% elseif attribute(tags, 'building:levels') is defined %} |
|||
{% set approxHeight = attribute(tags, 'building:levels') * 3.5 %} |
|||
{% endif %} |
|||
|
|||
{% if approxHeight <= 50 %} |
|||
{% set color = colorInterpolate(['green', 'red'], approxHeight / 50) %} |
|||
{% elseif approxHeight %} |
|||
{% set color = colorInterpolate(['red', 'yellow'], (approxHeight - 50) / 250) %} |
|||
{% else %} |
|||
{% set color = '#7f7f7f' %} |
|||
{% endif %} |
|||
description: |- |
|||
{% if tags.building == 'yes' and tags.military %} |
|||
{{ tagTrans('building', 'military') }} |
|||
{% elseif tags.building == 'yes' %} |
|||
{{ keyTrans('building') }} |
|||
{% else %} |
|||
{{ tagTransList('building', tags.building) }} |
|||
{% endif %} |
|||
{% if tags.building == 'construction' and tags.construction %} |
|||
({{ tagTransList('building', tags.construction) }}) |
|||
{% endif %} |
|||
{% if tags.building in [ 'yes', 'military' ] and tags.military %} |
|||
({{ tagTransList('military', tags.military) }}) |
|||
{% endif %} |
|||
details: |- |
|||
{% if tags.height is defined %} |
|||
{% if tags.height|matches('(m|ft)$') %}{{ tags.height -}} |
|||
{% else %}{{ tags.height }} m |
|||
{%- endif -%} |
|||
{% endif -%} |
|||
|
|||
{%- if attribute(tags, 'building:levels') is defined -%} |
|||
{%- if tags.height is defined %}, {% endif %} |
|||
{{ attribute(tags, 'building:levels') }} {{ keyTrans('building:levels') }} |
|||
{% endif %} |
|||
markerSymbol: null |
|||
listMarkerSymbol: |- |
|||
{{ markerPolygon({"fillColor": color, "fillOpacity": 0.8, "width": 1, "color": "#000000" })|raw }} |
|||
priority: |- |
|||
{{ (approxHeight|default(0)) * -1 }} |
|||
style: |
|||
width: 1 |
|||
color: '#000000' |
|||
fillColor: |- |
|||
{{ color }} |
|||
fillOpacity: 1 |
|||
info: |- |
|||
<div style='display: inline-block'> |
|||
{{ tagTrans('height') }} |
|||
<table> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes" }))|raw }}</td> |
|||
<td colspan>{{ trans('unknown') }}</td> |
|||
</tr> |
|||
{% for i in range(0, 50, 10) %} |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "height": i }))|raw }}</td> |
|||
<td>{{ i }}m</td> |
|||
</tr> |
|||
{% endfor %} |
|||
{% for i in range(100, 250, 50) %} |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "height": i }))|raw }}</td> |
|||
<td>{{ i }}m</td> |
|||
</tr> |
|||
{% endfor %} |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "height": "300" }))|raw }}</td> |
|||
<td>≥300m</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
<div style='display: inline-block'> |
|||
{{ tagTrans('building:levels') }} |
|||
<table> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes" }))|raw }}</td> |
|||
<td colspan>{{ trans('unknown') }}</td> |
|||
</tr> |
|||
{% for i in range(0, 12, 3) %} |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "building:levels": i }))|raw }}</td> |
|||
<td>{{ i }}</td> |
|||
</tr> |
|||
{% endfor %} |
|||
{% for i in range(15, 84, 15) %} |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "building:levels": i }))|raw }}</td> |
|||
<td>{{ i }}</td> |
|||
</tr> |
|||
{% endfor %} |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "building:levels": "85" }))|raw }}</td> |
|||
<td>≥85</td> |
|||
</tr> |
|||
</table> |
|||
|
|||
</div> |
@ -1,165 +0,0 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"de": "Gebäudealter", |
|||
"en": "Building age", |
|||
"fr": "Date de construction", |
|||
"pt-br": "Idade" |
|||
}, |
|||
"query": { |
|||
"16": [ |
|||
"(", |
|||
" way[building];", |
|||
" relation[building];", |
|||
")" |
|||
] |
|||
}, |
|||
"feature": { |
|||
"pre": [ |
|||
"{% set type = tags.building|split(';')[0] %}", |
|||
"{% if tags.military %}{% set type = 'military' %}{% endif %}", |
|||
"", |
|||
"{% set start_date = tags.start_date %}", |
|||
"{% if attribute(tags, 'building:start_date') %}{% set start_date = attribute(tags, 'building:start_date') %}{% endif %}", |
|||
"{# Deprecated tags #}", |
|||
"{% if not start_date and attribute(tags, 'building:age') %}{% set start_date = attribute(tags, 'building:age') %}{% endif %}", |
|||
"{% if not start_date and attribute(tags, 'building:year_built') %}{% set start_date = attribute(tags, 'building:year_built') %}{% endif %}", |
|||
"{% if not start_date and attribute(tags, 'building:buildyear') %}{% set start_date = attribute(tags, 'building:buildyear') %}{% endif %}", |
|||
"{% if not start_date and attribute(tags, 'year_built') %}{% set start_date = attribute(tags, 'year_built') %}{% endif %}", |
|||
"{% if not start_date and attribute(tags, 'building:year') %}{% set start_date = attribute(tags, 'building:year') %}{% endif %}", |
|||
"{% if not start_date and attribute(tags, 'year_of_construction') %}{% set start_date = attribute(tags, 'year_of_construction') %}{% endif %}", |
|||
"", |
|||
"{% if start_date %}", |
|||
" {# equalize tagging mistakes - need to add QA messages #}", |
|||
" {# convert 1910-1911 to 1910..1911 #}{% set m = start_date|matches('^(\\d{4})-(\\d{4})$') %}{% if m %}{% set start_date = m[1] ~ '..' ~ m[2] %}{% endif %}", |
|||
" {# convert 191* to 1910s #}{% set m = start_date|matches('^(\\d{3})\\*$') %}{% if m %}{% set start_date = m[1] ~ '0s' %}{% endif %}", |
|||
"", |
|||
"", |
|||
" {% set value = start_date|osmParseDate %}", |
|||
" {% if value and value[0] and value[1] %}", |
|||
" {% set value = (value[1] - value[0]) / 2 + value[0] %}", |
|||
" {% elseif value and value[0] %}", |
|||
" {% set value = value[0] %}", |
|||
" {% elseif value and value[1] %}", |
|||
" {% set value = value[1] %}", |
|||
" {% else %}", |
|||
" {% set value = 'error' %}", |
|||
" {% endif %}", |
|||
"", |
|||
" {% if value == 'error' %}", |
|||
" {% set color = '#ff0000' %}", |
|||
" {% elseif value < 1500 %}", |
|||
" {% set color = '#0000ff' %}", |
|||
" {% elseif value < 1900 %}", |
|||
" {% set color = colorInterpolate([ '#0000ff', '#ff00ff' ], (value - 1500.0) / 400) %}", |
|||
" {% elseif value < 2000 %}", |
|||
" {% set color = colorInterpolate([ '#ff00ff', '#ffff00' ], (value - 1900.0) / 100) %}", |
|||
" {% else %}", |
|||
" {% set color = colorInterpolate([ '#ffff00', '#00ff00' ], (value - 2000.0) / 50) %}", |
|||
" {% endif %}", |
|||
"{% else %}", |
|||
"{% set color = '#7f7f7f' %}", |
|||
"{% endif %}" |
|||
], |
|||
"description": [ |
|||
"{% if tags.building == 'yes' and tags.military %}", |
|||
"{{ tagTrans('building', 'military') }}", |
|||
"{% elseif tags.building == 'yes' %}", |
|||
"{{ keyTrans('building') }}", |
|||
"{% else %}", |
|||
"{{ tagTransList('building', tags.building) }}", |
|||
"{% endif %}", |
|||
"{% if tags.building == 'construction' and tags.construction %}", |
|||
"({{ tagTransList('building', tags.construction) }})", |
|||
"{% endif %}", |
|||
"{% if tags.building in [ 'yes', 'military' ] and tags.military %}", |
|||
"({{ tagTransList('military', tags.military) }})", |
|||
"{% endif %}" |
|||
], |
|||
"details": [ |
|||
"{% if start_date %}", |
|||
"{{ start_date|osmFormatDate({ format: 'short' }) }}", |
|||
"{% else %}", |
|||
"{{ trans('unknown') }}", |
|||
"{% endif %}" |
|||
], |
|||
"body": [ |
|||
"<ul>", |
|||
"{% if attribute(tags, 'building:start_date') %}<li>", |
|||
"<span class='key'>{{ keyTrans('building:start_date') }}:</span>", |
|||
"<span class='value'>{{ attribute(tags, 'building:start_date')|osmFormatDate }}</span>", |
|||
"</li>{% endif %}", |
|||
"</ul>" |
|||
], |
|||
"markerSymbol": null, |
|||
"listMarkerSymbol": "{{ markerPolygon({ \"fillColor\": color, \"fillOpacity\": 0.8, \"width\": 1, \"color\": \"#000000\" })|raw }}", |
|||
"priority": [ |
|||
"{% set p = 100 %}", |
|||
"{% if start_date %}{% set p = p - 20 %}{% endif %}", |
|||
"{% if tags.name %}{% set p = p - 10 %}{% endif %}", |
|||
"{% if tags.amenity %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.historic %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.culture %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.highway %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.railway %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.aeroway %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.amenity %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.tourism %}{% set p = p - 1 %}{% endif %}", |
|||
"{{ p }}" |
|||
], |
|||
"style": { |
|||
"width": "1", |
|||
"color": "#000000", |
|||
"fillColor": "{{ color }}", |
|||
"fillOpacity": "0.8" |
|||
} |
|||
}, |
|||
"info": [ |
|||
"<table>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"start_date\": \"1400\" }))|raw }}</td>", |
|||
" <td><1500</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"start_date\": \"1500\" }))|raw }}</td>", |
|||
" <td>1500</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"start_date\": \"1600\" }))|raw }}</td>", |
|||
" <td>1600</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"start_date\": \"1700\" }))|raw }}</td>", |
|||
" <td>1700</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"start_date\": \"1800\" }))|raw }}</td>", |
|||
" <td>1800</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"start_date\": \"1900\" }))|raw }}</td>", |
|||
" <td>1900</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"start_date\": \"1950\" }))|raw }}</td>", |
|||
" <td>1950</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"start_date\": \"2000\" }))|raw }}</td>", |
|||
" <td>2000</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"start_date\": \"2020\" }))|raw }}</td>", |
|||
" <td>2020</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\", \"start_date\": \"xxx\" }))|raw }}</td>", |
|||
" <td>{{ repoTrans('date format not understood') }}</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerPolygon(evaluate({ \"building\": \"yes\" }))|raw }}</td>", |
|||
" <td>{{ trans('unknown') }}</td>", |
|||
" </tr>", |
|||
"</table>" |
|||
] |
|||
} |
@ -0,0 +1,147 @@ |
|||
query: |
|||
16: |- |
|||
( |
|||
way[building]; |
|||
relation[building]; |
|||
) |
|||
feature: |
|||
pre: |- |
|||
{% set type = tags.building|split(';')[0] %} |
|||
{% if tags.military %}{% set type = 'military' %}{% endif %} |
|||
|
|||
{% set start_date = tags.start_date %} |
|||
{% if attribute(tags, 'building:start_date') %}{% set start_date = attribute(tags, 'building:start_date') %}{% endif %} |
|||
{# Deprecated tags #} |
|||
{% if not start_date and attribute(tags, 'building:age') %}{% set start_date = attribute(tags, 'building:age') %}{% endif %} |
|||
{% if not start_date and attribute(tags, 'building:year_built') %}{% set start_date = attribute(tags, 'building:year_built') %}{% endif %} |
|||
{% if not start_date and attribute(tags, 'building:buildyear') %}{% set start_date = attribute(tags, 'building:buildyear') %}{% endif %} |
|||
{% if not start_date and attribute(tags, 'year_built') %}{% set start_date = attribute(tags, 'year_built') %}{% endif %} |
|||
{% if not start_date and attribute(tags, 'building:year') %}{% set start_date = attribute(tags, 'building:year') %}{% endif %} |
|||
{% if not start_date and attribute(tags, 'year_of_construction') %}{% set start_date = attribute(tags, 'year_of_construction') %}{% endif %} |
|||
|
|||
{% if start_date %} |
|||
{# equalize tagging mistakes - need to add QA messages #} |
|||
{# convert 1910-1911 to 1910..1911 #}{% set m = start_date|matches('^(\d{4})-(\d{4})$') %}{% if m %}{% set start_date = m[1] ~ '..' ~ m[2] %}{% endif %} |
|||
{# convert 191* to 1910s #}{% set m = start_date|matches('^(\d{3})\*$') %}{% if m %}{% set start_date = m[1] ~ '0s' %}{% endif %} |
|||
|
|||
|
|||
{% set value = start_date|osmParseDate %} |
|||
{% if value and value[0] and value[1] %} |
|||
{% set value = (value[1] - value[0]) / 2 + value[0] %} |
|||
{% elseif value and value[0] %} |
|||
{% set value = value[0] %} |
|||
{% elseif value and value[1] %} |
|||
{% set value = value[1] %} |
|||
{% else %} |
|||
{% set value = 'error' %} |
|||
{% endif %} |
|||
|
|||
{% if value == 'error' %} |
|||
{% set color = '#ff0000' %} |
|||
{% elseif value < 1500 %} |
|||
{% set color = '#0000ff' %} |
|||
{% elseif value < 1900 %} |
|||
{% set color = colorInterpolate([ '#0000ff', '#ff00ff' ], (value - 1500.0) / 400) %} |
|||
{% elseif value < 2000 %} |
|||
{% set color = colorInterpolate([ '#ff00ff', '#ffff00' ], (value - 1900.0) / 100) %} |
|||
{% else %} |
|||
{% set color = colorInterpolate([ '#ffff00', '#00ff00' ], (value - 2000.0) / 50) %} |
|||
{% endif %} |
|||
{% else %} |
|||
{% set color = '#7f7f7f' %} |
|||
{% endif %} |
|||
description: |- |
|||
{% if tags.building == 'yes' and tags.military %} |
|||
{{ tagTrans('building', 'military') }} |
|||
{% elseif tags.building == 'yes' %} |
|||
{{ keyTrans('building') }} |
|||
{% else %} |
|||
{{ tagTransList('building', tags.building) }} |
|||
{% endif %} |
|||
{% if tags.building == 'construction' and tags.construction %} |
|||
({{ tagTransList('building', tags.construction) }}) |
|||
{% endif %} |
|||
{% if tags.building in [ 'yes', 'military' ] and tags.military %} |
|||
({{ tagTransList('military', tags.military) }}) |
|||
{% endif %} |
|||
details: |- |
|||
{% if start_date %} |
|||
{{ start_date|osmFormatDate({ format: 'short' }) }} |
|||
{% else %} |
|||
{{ trans('unknown') }} |
|||
{% endif %} |
|||
body: |- |
|||
<ul> |
|||
{% if attribute(tags, 'building:start_date') %}<li> |
|||
<span class='key'>{{ keyTrans('building:start_date') }}:</span> |
|||
<span class='value'>{{ attribute(tags, 'building:start_date')|osmFormatDate }}</span> |
|||
</li>{% endif %} |
|||
</ul> |
|||
markerSymbol: null |
|||
listMarkerSymbol: |- |
|||
{{ markerPolygon({ "fillColor": color, "fillOpacity": 0.8, "width": 1, "color": "#000000" })|raw }} |
|||
priority: |- |
|||
{% set p = 100 %} |
|||
{% if start_date %}{% set p = p - 20 %}{% endif %} |
|||
{% if tags.name %}{% set p = p - 10 %}{% endif %} |
|||
{% if tags.amenity %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.historic %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.culture %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.highway %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.railway %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.aeroway %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.amenity %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.tourism %}{% set p = p - 1 %}{% endif %} |
|||
{{ p }} |
|||
style: |
|||
width: 1 |
|||
color: '#000000' |
|||
fillColor: '{{ color }}' |
|||
fillOpacity: 0.8 |
|||
info: |- |
|||
<table> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1400" }))|raw }}</td> |
|||
<td><1500</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1500" }))|raw }}</td> |
|||
<td>1500</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1600" }))|raw }}</td> |
|||
<td>1600</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1700" }))|raw }}</td> |
|||
<td>1700</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1800" }))|raw }}</td> |
|||
<td>1800</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1900" }))|raw }}</td> |
|||
<td>1900</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1950" }))|raw }}</td> |
|||
<td>1950</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "start_date": "2000" }))|raw }}</td> |
|||
<td>2000</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "start_date": "2020" }))|raw }}</td> |
|||
<td>2020</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes", "start_date": "xxx" }))|raw }}</td> |
|||
<td>{{ repoTrans('date format not understood') }}</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerPolygon(evaluate({ "building": "yes" }))|raw }}</td> |
|||
<td>{{ trans('unknown') }}</td> |
|||
</tr> |
|||
</table> |
@ -1,243 +0,0 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"de": "Gebäudearten", |
|||
"en": "Building types", |
|||
"fr": "Type", |
|||
"pt-br": "Tipologias" |
|||
}, |
|||
"query": { |
|||
"16": "nwr[building][building!=no];" |
|||
}, |
|||
"feature": { |
|||
"pre": [ |
|||
"{% set type = tags.building|split(';')[0] %}", |
|||
"{% if tags.military %}{% set type = 'military' %}{% endif %}", |
|||
"{% set color = const.other.color %}", |
|||
"{% for cat, data in const %}", |
|||
" {% if type in data.types %}", |
|||
" {% set color = data.color %}", |
|||
" {% endif %}", |
|||
"{% endfor %}" |
|||
], |
|||
"description": [ |
|||
"{% if tags.building == 'yes' and tags.military %}", |
|||
"{{ tagTrans('building', 'military') }}", |
|||
"{% elseif tags.building == 'yes' %}", |
|||
"{{ keyTrans('building') }}", |
|||
"{% else %}", |
|||
"{{ tagTransList('building', tags.building) }}", |
|||
"{% endif %}", |
|||
"{% if tags.building == 'construction' and tags.construction %}", |
|||
"({{ tagTransList('building', tags.construction) }})", |
|||
"{% endif %}", |
|||
"{% if tags.building in [ 'yes', 'military' ] and tags.military %}", |
|||
"({{ tagTransList('military', tags.military) }})", |
|||
"{% endif %}" |
|||
], |
|||
"markerSymbol": "", |
|||
"listMarkerSymbol": "{{ markerPolygon({\"fillColor\": color, \"fillOpacity\": 0.8, \"width\": 1, \"color\": \"#000000\" })|raw }}", |
|||
"priority": [ |
|||
"{% set p = 100 %}", |
|||
"{% if tags.name %}{% set p = p - 10 %}{% endif %}", |
|||
"{% if tags.amenity %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.historic %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.culture %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.highway %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.railway %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.aeroway %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.amenity %}{% set p = p - 1 %}{% endif %}", |
|||
"{% if tags.tourism %}{% set p = p - 1 %}{% endif %}", |
|||
"{{ p }}" |
|||
], |
|||
"style": { |
|||
"width": "1", |
|||
"color": "#000000", |
|||
"fillColor": "{{ color }}", |
|||
"fillOpacity": "0.8" |
|||
} |
|||
}, |
|||
"info": [ |
|||
"<table>", |
|||
"{% for cat, data in const %}", |
|||
" <tr>", |
|||
" <td valign='top'>{{ markerPolygon({ \"fillColor\": data.color, \"fillOpacity\": \"0.8\", \"width\": 1, \"color\": \"#000000\" })|raw }}</td>", |
|||
" <td onclick='this.classList.toggle(\"infoShowDetails\")'><b>{{ trans(data.name) }}</b><span class='details'>:", |
|||
" {% for i, type in data.types %}<span title='building={{ type }}'>{% if i > 0 %}, {% endif %}{{ tagTrans('building', type) }}</span>{% endfor %}", |
|||
" </span>", |
|||
"<span class='summary'><i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></span>", |
|||
" </td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
"</table>" |
|||
], |
|||
"const": { |
|||
"residential": { |
|||
"name": "tag:building=residential", |
|||
"color": "#25a000", |
|||
"types": [ |
|||
"house", |
|||
"apartments", |
|||
"block", |
|||
"flats", |
|||
"farm", |
|||
"detached", |
|||
"dormitory", |
|||
"terrace", |
|||
"houseboat", |
|||
"bungalow", |
|||
"static_caravan", |
|||
"residential", |
|||
"semidetached_house", |
|||
"ger", |
|||
"trullo" |
|||
] |
|||
}, |
|||
"tourism": { |
|||
"name": "tag:tourism", |
|||
"color": "#814ce2", |
|||
"types": [ |
|||
"hotel", |
|||
"ruins", |
|||
"conservatory" |
|||
] |
|||
}, |
|||
"commercial": { |
|||
"name": "tag:building=commercial", |
|||
"color": "#ec5bcf", |
|||
"types": [ |
|||
"commercial", |
|||
"office", |
|||
"industrial", |
|||
"retail", |
|||
"supermarket", |
|||
"warehouse", |
|||
"kiosk", |
|||
"mall", |
|||
"shop" |
|||
] |
|||
}, |
|||
"religious": { |
|||
"name": "tag:building=religious", |
|||
"color": "#af29cc", |
|||
"types": [ |
|||
"religious", |
|||
"cathedral", |
|||
"chapel", |
|||
"church", |
|||
"mosque", |
|||
"temple", |
|||
"synagogue", |
|||
"shrine", |
|||
"monastery" |
|||
] |
|||
}, |
|||
"amenity": { |
|||
"name": "tag:amenity", |
|||
"color": "#2935cc", |
|||
"types": [ |
|||
"kindergarten", |
|||
"civic", |
|||
"government", |
|||
"hospital", |
|||
"school", |
|||
"university", |
|||
"grandstand", |
|||
"public", |
|||
"toilets", |
|||
"college" |
|||
] |
|||
}, |
|||
"agriculture": { |
|||
"name": "tag:building=agriculture", |
|||
"color": "#92e934", |
|||
"types": [ |
|||
"bakehouse", |
|||
"barn", |
|||
"cowshed", |
|||
"farm_auxiliary", |
|||
"greenhouse", |
|||
"stable", |
|||
"sty", |
|||
"kitchen", |
|||
"slurry_tank", |
|||
"silo" |
|||
] |
|||
}, |
|||
"industrial": { |
|||
"name": "tag:landuse=industrial", |
|||
"color": "#e2da1b", |
|||
"types": [ |
|||
"construction", |
|||
"garbage_shed", |
|||
"transformer_tower", |
|||
"service", |
|||
"water_tower", |
|||
"industrial", |
|||
"warehouse", |
|||
"storage_tank" |
|||
] |
|||
}, |
|||
"transportation": { |
|||
"name": "tag:building=transportation", |
|||
"color": "#1bb5e2", |
|||
"types": [ |
|||
"carport", |
|||
"garage", |
|||
"garages", |
|||
"bridge", |
|||
"hangar", |
|||
"parking", |
|||
"train_station", |
|||
"transportation" |
|||
] |
|||
}, |
|||
"sport": { |
|||
"name": "tag:sport", |
|||
"color": "#e21b66", |
|||
"types": [ |
|||
"pavilion", |
|||
"riding_hall", |
|||
"stadium", |
|||
"sports_hall" |
|||
] |
|||
}, |
|||
"roof": { |
|||
"name": "tag:building=roof", |
|||
"color": "#afafaf7f", |
|||
"types": [ |
|||
"roof" |
|||
] |
|||
}, |
|||
"shelter": { |
|||
"name": "tag:amenity=shelter", |
|||
"color": "#cc8725", |
|||
"types": [ |
|||
"cabin", |
|||
"hut", |
|||
"shed" |
|||
] |
|||
}, |
|||
"military": { |
|||
"name": "tag:building=military", |
|||
"color": "#4a7300", |
|||
"types": [ |
|||
"bunker", |
|||
"military" |
|||
] |
|||
}, |
|||
"unspecified": { |
|||
"name": "tag:building=generic", |
|||
"color": "#7f7f7f", |
|||
"types": [ |
|||
"yes", |
|||
"generic" |
|||
] |
|||
}, |
|||
"other": { |
|||
"name": "other", |
|||
"color": "#ff0000", |
|||
"types": [] |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,201 @@ |
|||
query: |
|||
16: nwr[building][building!=no]; |
|||
feature: |
|||
pre: |- |
|||
{% set type = tags.building|split(';')[0] %} |
|||
{% if tags.military %}{% set type = 'military' %}{% endif %} |
|||
{% set color = const.other.color %} |
|||
{% for cat, data in const %} |
|||
{% if type in data.types %} |
|||
{% set color = data.color %} |
|||
{% endif %} |
|||
{% endfor %} |
|||
description: |- |
|||
{% if tags.building == 'yes' and tags.military %} |
|||
{{ tagTrans('building', 'military') }} |
|||
{% elseif tags.building == 'yes' %} |
|||
{{ keyTrans('building') }} |
|||
{% else %} |
|||
{{ tagTransList('building', tags.building) }} |
|||
{% endif %} |
|||
{% if tags.building == 'construction' and tags.construction %} |
|||
({{ tagTransList('building', tags.construction) }}) |
|||
{% endif %} |
|||
{% if tags.building in [ 'yes', 'military' ] and tags.military %} |
|||
({{ tagTransList('military', tags.military) }}) |
|||
{% endif %} |
|||
markerSymbol: '' |
|||
listMarkerSymbol: |- |
|||
{{ markerPolygon({"fillColor": color, "fillOpacity": 0.8, "width": 1, "color": "#000000" })|raw }} |
|||
priority: |- |
|||
{% set p = 100 %} |
|||
{% if tags.name %}{% set p = p - 10 %}{% endif %} |
|||
{% if tags.amenity %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.historic %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.culture %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.highway %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.railway %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.aeroway %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.amenity %}{% set p = p - 1 %}{% endif %} |
|||
{% if tags.tourism %}{% set p = p - 1 %}{% endif %} |
|||
{{ p }} |
|||
style: |
|||
width: 1 |
|||
color: '#000000' |
|||
fillColor: |- |
|||
{{ color }} |
|||
fillOpacity: 0.8 |
|||
info: |- |
|||
<table> |
|||
{% for cat, data in const %} |
|||
<tr> |
|||
<td valign='top'>{{ markerPolygon({ "fillColor": data.color, "fillOpacity": "0.8", "width": 1, "color": "#000000" })|raw }}</td> |
|||
<td onclick='this.classList.toggle("infoShowDetails")'><b>{{ trans(data.name) }}</b><span class='details'>: |
|||
{% for i, type in data.types %}<span title='building={{ type }}'>{% if i > 0 %}, {% endif %}{{ tagTrans('building', type) }}</span>{% endfor %} |
|||
</span> |
|||
<span class='summary'><i class="fa fa-info-circle" aria-hidden="true"></i></span> |
|||
</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
const: |
|||
residential: |
|||
name: tag:building=residential |
|||
color: '#25a000' |
|||
types: |
|||
- house |
|||
- apartments |
|||
- block |
|||
- flats |
|||
- farm |
|||
- detached |
|||
- dormitory |
|||
- terrace |
|||
- houseboat |
|||
- bungalow |
|||
- static_caravan |
|||
- residential |
|||
- semidetached_house |
|||
- ger |
|||
- trullo |
|||
tourism: |
|||
name: tag:tourism |
|||
color: '#814ce2' |
|||
types: |
|||
- hotel |
|||
- ruins |
|||
- conservatory |
|||
commercial: |
|||
name: tag:building=commercial |
|||
color: '#ec5bcf' |
|||
types: |
|||
- commercial |
|||
- office |
|||
- industrial |
|||
- retail |
|||
- supermarket |
|||
- warehouse |
|||
- kiosk |
|||
- mall |
|||
- shop |
|||
religious: |
|||
name: tag:building=religious |
|||
color: '#af29cc' |
|||
types: |
|||
- religious |
|||
- cathedral |
|||
- chapel |
|||
- church |
|||
- mosque |
|||
- temple |
|||
- synagogue |
|||
- shrine |
|||
- monastery |
|||
amenity: |
|||
name: tag:amenity |
|||
color: '#2935cc' |
|||
types: |
|||
- kindergarten |
|||
- civic |
|||
- government |
|||
- hospital |
|||
- school |
|||
- university |
|||
- grandstand |
|||
- public |
|||
- toilets |
|||
- college |
|||
agriculture: |
|||
name: tag:building=agriculture |
|||
color: '#92e934' |
|||
types: |
|||
- bakehouse |
|||
- barn |
|||
- cowshed |
|||
- farm_auxiliary |
|||
- greenhouse |
|||
- stable |
|||
- sty |
|||
- kitchen |
|||
- slurry_tank |
|||
- silo |
|||
industrial: |
|||
name: tag:landuse=industrial |
|||
color: '#e2da1b' |
|||
types: |
|||
- construction |
|||
- garbage_shed |
|||
- transformer_tower |
|||
- service |
|||
- water_tower |
|||
- industrial |
|||
- warehouse |
|||
- storage_tank |
|||
transportation: |
|||
name: tag:building=transportation |
|||
color: '#1bb5e2' |
|||
types: |
|||
- carport |
|||
- garage |
|||
- garages |
|||
- bridge |
|||
- hangar |
|||
- parking |
|||
- train_station |
|||
- transportation |
|||
sport: |
|||
name: tag:sport |
|||
color: '#e21b66' |
|||
types: |
|||
- pavilion |
|||
- riding_hall |
|||
- stadium |
|||
- sports_hall |
|||
roof: |
|||
name: tag:building=roof |
|||
color: '#afafaf7f' |
|||
types: |
|||
- roof |
|||
shelter: |
|||
name: tag:amenity=shelter |
|||
color: '#cc8725' |
|||
types: |
|||
- cabin |
|||
- hut |
|||
- shed |
|||
military: |
|||
name: tag:building=military |
|||
color: '#4a7300' |
|||
types: |
|||
- bunker |
|||
- military |
|||
unspecified: |
|||
name: tag:building=generic |
|||
color: '#7f7f7f' |
|||
types: |
|||
- 'yes' |
|||
- generic |
|||
other: |
|||
name: other |
|||
color: '#ff0000' |
|||
types: [] |
Write
Preview
Loading…
Cancel
Save
Reference in new issue