Changes between Version 3 and Version 4 of Presets/UnitedKingdomAddresses


Ignore:
Timestamp:
2024-06-22T22:59:55+02:00 (2 years ago)
Author:
achadwick
Comment:

Support either the global addr:place schema (by default), and permit the Wiki's addr:substreet schema too (but make it clear it's weird)

Legend:

Unmodified
Added
Removed
Modified
  • Presets/UnitedKingdomAddresses

    v3 v4  
    1919  shortdescription="UK Addresses"
    2020  version="1.[[revision]]_[[date]]"
    21   >
    22 <group name="Annotation">
    23 
    24     <!-- UK address -->
    25     <item name="UK Address"
    26       preset_name_label="true"
    27       icon="stamp1-16.svg"
    28       icon_size="48"
    29       type="node,way,closedway,multipolygon"
    30     >
    31 
    32     <link href="https://wiki.openstreetmap.org/wiki/Addresses_in_the_United_Kingdom"/>
    33 
     21>
     22
     23  <chunk id="premises">
    3424    <optional text="Premises">
    3525      <!-- Sub-building name -->
     
    4232        match="key"
    4333      />
    44 
    4534      <!-- Building name/number -->
    4635      <text key="addr:housename"
     
    5443      />
    5544    </optional>
    56 
    57     <optional text="Thoroughfare. Street-based if possible, non-street-based if needed.">
    58 
     45  </chunk>
     46
     47  <chunk id="thoroughfare-place">
     48    <optional text="Thoroughfare. Valid combinations: A, B, A+C, B+C, &lt;none&gt;">
     49      <!--
     50      For this schema, A+B is globally forbidden.
     51      That's fine though. We have addr:parentstreet when A is needed.
     52      -->
     53      <text key="addr:place"
     54        use_last_as_default="true"
     55        text="A: non-Street grouping"
     56        match="key"
     57      />
     58      <text key="addr:street"
     59        use_last_as_default="true"
     60        text="B: Street (actual or child)"
     61        match="key"
     62      />
     63      <text key="addr:parentstreet"
     64        use_last_as_default="true"
     65        text="C: Street (parent, if required)"
     66        match="key"
     67      />
     68    </optional>
     69  </chunk>
     70
     71  <chunk id="thoroughfare-substreet">
     72    <optional text="Thoroughfare ('substreet' schema). Combinations: A, B, A+B, B+C, &lt;none&gt;">
     73      <!--
     74      For this schema, A+C is counterproductive: you *should* use street if permitted
     75      -->
    5976      <text key="addr:substreet"
    6077        use_last_as_default="true"
    61         text="Non-Street grouping"
     78        text="A: non-Street grouping"
    6279        match="key"
    6380      />
    6481      <text key="addr:street"
    6582        use_last_as_default="true"
    66         text="Street (closest)"
     83        text="B: Street (actual)"
    6784        match="key"
    6885      />
    6986      <text key="addr:parentstreet"
    7087        use_last_as_default="true"
    71         text="Street (parent, if needed)"
    72         match="key"
    73       />
    74     </optional>
    75 
    76       <optional text="Locality. Subareas include hamlets/villages/towns/suburbs. One intermediate max.">
    77         <text key="addr:suburb"
    78           use_last_as_default="true"
    79           text="Optional: Subarea (of Post Town)"
    80           match="key"
    81         />
    82         <text key="addr:hamlet"
    83           use_last_as_default="true"
    84           text="Rare: Intermediate (if hamlet)"
    85           match="key"/>
    86         <text key="addr:village"
    87           use_last_as_default="true"
    88           text="Rare: Intermediate (if village)"
    89           match="key"
    90         />
    91         <text key="addr:town"
    92           use_last_as_default="true"
    93           text="Rare: Intermediate (if town)"
    94           match="key"
    95         />
    96         <text key="addr:city"
    97           use_last_as_default="true"
    98           text="Required: Post Town (or city)"
    99           match="key"
    100         />
    101         <space />
    102         <text key="addr:postcode"
    103           use_last_as_default="true"
    104           text="Postcode"
    105           match="key"
    106         />
    107       </optional>
    108     </item>
    109 
    110 
    111     <!-- Addresses with tags that are deprecated in the UK -->
     88        text="Street (parent, if required)"
     89        match="key"
     90      />
     91    </optional>
     92  </chunk>
     93
     94  <chunk id="locality">
     95    <optional
     96      text="Locality. Subareas include hamlets/villages/towns/suburbs. One intermediate max."
     97    >
     98      <text key="addr:suburb"
     99        use_last_as_default="true"
     100        text="Optional: Subarea (of Post Town)"
     101        match="key"
     102      />
     103      <text key="addr:hamlet"
     104        use_last_as_default="true"
     105        text="Rare: Intermediate (if hamlet)"
     106        match="key"/>
     107      <text key="addr:village"
     108        use_last_as_default="true"
     109        text="Rare: Intermediate (if village)"
     110        match="key"
     111      />
     112      <text key="addr:town"
     113        use_last_as_default="true"
     114        text="Rare: Intermediate (if town)"
     115        match="key"
     116      />
     117      <text key="addr:city"
     118        use_last_as_default="true"
     119        text="Required: Post Town (or city)"
     120        match="key"
     121      />
     122      <space />
     123      <text key="addr:postcode"
     124        use_last_as_default="true"
     125        text="Postcode"
     126        match="key"
     127      />
     128    </optional>
     129  </chunk>
     130
     131  <group name="Annotation">
     132
     133    <!-- UK address -->
     134    <item name="UK Address"
     135      preset_name_label="true"
     136      icon="stamp1-16.svg"
     137      icon_size="48"
     138      type="node,way,closedway,multipolygon"
     139      match_expression='"addr:"*=* -("addr:substreet"=*)'
     140    >
     141      <link href="https://wiki.openstreetmap.org/wiki/Addresses_in_the_United_Kingdom"/>
     142      <reference ref="premises"/>
     143      <reference ref="thoroughfare-place"/>
     144      <reference ref="locality"/>
     145    </item>
     146
     147    <item name="UK Address (UK-specific addr:substreet schema)"
     148      preset_name_label="true"
     149      icon="stamp1-16.svg"
     150      icon_size="48"
     151      type="node,way,closedway,multipolygon"
     152      match_expression='"addr:substreet"=* -("addr:place"=*)'
     153    >
     154      <link href="https://wiki.openstreetmap.org/wiki/Addresses_in_the_United_Kingdom"/>
     155      <reference ref="premises"/>
     156      <reference ref="thoroughfare-substreet"/>
     157      <reference ref="locality"/>
     158    </item>
     159
     160    <!-- Addresses with tags and combinations that are deprecated in the UK -->
    112161
    113162    <item
    114       name="UK Address: Deprecated Tags"
     163      name="UK Address: Deprecated place+substreet combination"
     164      preset_name_label="true"
     165      icon="stamp3-16.svg"
     166      icon_size="48"
     167      type="node,way,closedway,multipolygon"
     168      match_expression='"addr:substreet"=* AND "addr:place"=*'
     169    >
     170      <label text="addr:place must not be used together with addr:substreet: their meanings overlap."/>
     171      <label text="To fix this, pick one of the schemas below."/>
     172
     173      <reference ref="thoroughfare-place"/>
     174      <space/>
     175      <item_separator />
     176      <reference ref="thoroughfare-substreet"/>
     177    </item>
     178
     179    <item
     180      name="UK Address: Tags to Avoid"
    115181      preset_name_label="true"
    116182      icon="stamp2-16.svg"
    117183      icon_size="48"
    118       type="node,way,closedway,multipolygon">
    119 
     184      type="node,way,closedway,multipolygon"
     185    >
    120186      <link href="https://wiki.openstreetmap.org/wiki/Addresses_in_the_United_Kingdom#Tags_to_avoid"/>
    121187
     
    123189        <text key="addr:terrace"
    124190          text="Terrace [1]"
    125           match="key"
    126         />
    127         <text
    128           key="addr:place"
    129           text="Place [1, 2]"
    130191          match="key"
    131192        />