name: ca: Antiguitat de l'edifici cs: Stáří budovy de: Gebäudealter en: Building age es: Edad del edificio fr: Date de construction gl: Idade do edificio hu: Épületek kora it: Età dell'edificio ja: 築年数 nb: Bygningsalder nl: Ouderdom van het gebouw oc: Data de bastison pl: Wiek budynków pt-br: Idade pt: Idade dos edifícios ro: Vârsta clădirii ru: Возраст здания sr: Старост зграде tr: Bina yaşı 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: |-
{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1400" }))|raw }} | <1500 |
{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1500" }))|raw }} | 1500 |
{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1600" }))|raw }} | 1600 |
{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1700" }))|raw }} | 1700 |
{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1800" }))|raw }} | 1800 |
{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1900" }))|raw }} | 1900 |
{{ markerPolygon(evaluate({ "building": "yes", "start_date": "1950" }))|raw }} | 1950 |
{{ markerPolygon(evaluate({ "building": "yes", "start_date": "2000" }))|raw }} | 2000 |
{{ markerPolygon(evaluate({ "building": "yes", "start_date": "2020" }))|raw }} | 2020 |
{{ markerPolygon(evaluate({ "building": "yes", "start_date": "xxx" }))|raw }} | {{ repoTrans('date format not understood') }} |
{{ markerPolygon(evaluate({ "building": "yes" }))|raw }} | {{ trans('unknown') }} |