Browse Source

buildings-start_date: equals some common tagging mistakes

- 1910-1911 -> 1910..1911
- 191* -> 1910s
pedestrian
parent
commit
e2de1c74ba
  1. 5
      buildings-start_date.json

5
buildings-start_date.json

@ -26,6 +26,11 @@
"{% if not start_date and attribute(tags, 'building:year') %}{% set start_date = attribute(tags, 'building:year') %}{% 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] %}",

Loading…
Cancel
Save