2 Feature: Update of address interpolations
 
   3     Test the interpolated address are updated correctly
 
   5     Scenario: addr:street added to interpolation
 
   6       Given the scene parallel-road
 
   8           | osm_id | class | type  | housenumber | geometry
 
   9           | 1      | place | house | 2           | :n-middle-w
 
  10           | 2      | place | house | 6           | :n-middle-e
 
  12           | osm_id | class   | type    | housenumber | geometry
 
  13           | 10     | place   | houses  | even        | :w-middle
 
  15           | osm_id | class   | type         | name                    | geometry
 
  16           | 2      | highway | unclassified | 'name' : 'Sun Way'      | :w-north
 
  17           | 3      | highway | unclassified | 'name' : 'Cloud Street' | :w-south
 
  20           | 10  | 1,100,101,102,2
 
  22       Then table placex contains
 
  23           | object | parent_place_id
 
  26       And table location_property_osmline contains
 
  27           | object | parent_place_id | startnumber | endnumber
 
  29       When updating place ways
 
  30           | osm_id | class   | type    | housenumber | street       | geometry
 
  31           | 10     | place   | houses  | even        | Cloud Street | :w-middle
 
  32       Then table placex contains
 
  33           | object | parent_place_id
 
  36       And table location_property_osmline contains
 
  37           | object | parent_place_id | startnumber | endnumber
 
  40     Scenario: addr:street added to housenumbers
 
  41       Given the scene parallel-road
 
  43           | osm_id | class | type  | housenumber | geometry
 
  44           | 1      | place | house | 2           | :n-middle-w
 
  45           | 2      | place | house | 6           | :n-middle-e
 
  47           | osm_id | class   | type    | housenumber | geometry
 
  48           | 10     | place   | houses  | even        | :w-middle
 
  50           | osm_id | class   | type         | name                    | geometry
 
  51           | 2      | highway | unclassified | 'name' : 'Sun Way'      | :w-north
 
  52           | 3      | highway | unclassified | 'name' : 'Cloud Street' | :w-south
 
  55           | 10  | 1,100,101,102,2
 
  57       Then table placex contains
 
  58           | object | parent_place_id
 
  61       And table location_property_osmline contains
 
  62           | object | parent_place_id | startnumber | endnumber
 
  64       When updating place nodes
 
  65           | osm_id | class | type  | street      | housenumber | geometry
 
  66           | 1      | place | house | Cloud Street| 2           | :n-middle-w
 
  67           | 2      | place | house | Cloud Street| 6           | :n-middle-e
 
  68       Then table placex contains
 
  69           | object | parent_place_id
 
  72       And table location_property_osmline contains
 
  73           | object | parent_place_id | startnumber | endnumber
 
  77     Scenario: interpolation tag removed
 
  78       Given the scene parallel-road
 
  80           | osm_id | class | type  | housenumber | geometry
 
  81           | 1      | place | house | 2           | :n-middle-w
 
  82           | 2      | place | house | 6           | :n-middle-e
 
  84           | osm_id | class   | type    | housenumber | geometry
 
  85           | 10     | place   | houses  | even        | :w-middle
 
  87           | osm_id | class   | type         | name                    | geometry
 
  88           | 2      | highway | unclassified | 'name' : 'Sun Way'      | :w-north
 
  89           | 3      | highway | unclassified | 'name' : 'Cloud Street' | :w-south
 
  92           | 10  | 1,100,101,102,2
 
  94       Then table placex contains
 
  95           | object | parent_place_id
 
  98       And table location_property_osmline contains
 
  99           | object | parent_place_id | startnumber | endnumber
 
 101       When marking for delete W10
 
 102       Then table location_property_osmline has no entry for W10
 
 103       And table placex contains
 
 104           | object | parent_place_id
 
 109     Scenario: referenced road added
 
 110       Given the scene parallel-road
 
 112           | osm_id | class | type  | housenumber | geometry
 
 113           | 1      | place | house | 2           | :n-middle-w
 
 114           | 2      | place | house | 6           | :n-middle-e
 
 116           | osm_id | class   | type    | housenumber | street      | geometry
 
 117           | 10     | place   | houses  | even        | Cloud Street| :w-middle
 
 119           | osm_id | class   | type         | name                    | geometry
 
 120           | 2      | highway | unclassified | 'name' : 'Sun Way'      | :w-north
 
 123           | 10  | 1,100,101,102,2
 
 125       Then table placex contains
 
 126           | object | parent_place_id
 
 129       And table location_property_osmline contains
 
 130           | object | parent_place_id | startnumber | endnumber
 
 132       When updating place ways
 
 133           | osm_id | class   | type         | name                    | geometry
 
 134           | 3      | highway | unclassified | 'name' : 'Cloud Street' | :w-south
 
 135       Then table placex contains
 
 136           | object | parent_place_id
 
 139       And table location_property_osmline contains
 
 140           | object | parent_place_id | startnumber | endnumber
 
 144     Scenario: referenced road deleted
 
 145       Given the scene parallel-road
 
 147           | osm_id | class | type  | housenumber | geometry
 
 148           | 1      | place | house | 2           | :n-middle-w
 
 149           | 2      | place | house | 6           | :n-middle-e
 
 151           | osm_id | class   | type    | housenumber | street      | geometry
 
 152           | 10     | place   | houses  | even        | Cloud Street| :w-middle
 
 154           | osm_id | class   | type         | name                    | geometry
 
 155           | 2      | highway | unclassified | 'name' : 'Sun Way'      | :w-north
 
 156           | 3      | highway | unclassified | 'name' : 'Cloud Street' | :w-south
 
 159           | 10  | 1,100,101,102,2
 
 161       Then table placex contains
 
 162           | object | parent_place_id
 
 165       And table location_property_osmline contains
 
 166           | object | parent_place_id | startnumber | endnumber
 
 168       When marking for delete W3
 
 169       Then table placex contains
 
 170           | object | parent_place_id
 
 173       And table location_property_osmline contains
 
 174           | object | parent_place_id | startnumber | endnumber
 
 177     Scenario: building becomes interpolation
 
 178       Given the scene building-with-parallel-streets
 
 180           | osm_id | class    | type  | housenumber | geometry
 
 181           | 1      | place    | house | 3           | :w-building
 
 183           | osm_id | class   | type         | name                    | geometry
 
 184           | 2      | highway | unclassified | 'name' : 'Cloud Street' | :w-south
 
 186       Then table placex contains
 
 187           | object | parent_place_id
 
 189       When updating place nodes
 
 190           | osm_id | class | type  | housenumber | geometry
 
 191           | 1      | place | house | 2           | :n-north-w
 
 192           | 2      | place | house | 6           | :n-north-e
 
 195           | 1   | 1,100,101,102,2
 
 196       And updating place ways
 
 197           | osm_id | class   | type    | housenumber | street      | geometry
 
 198           | 1      | place   | houses  | even        | Cloud Street| :w-north
 
 199       Then table placex has no entry for W1
 
 200       And table location_property_osmline contains
 
 201           | object | parent_place_id | startnumber | endnumber
 
 206     Scenario: interpolation becomes building
 
 207       Given the scene building-with-parallel-streets
 
 209           | osm_id | class | type  | housenumber | geometry
 
 210           | 1      | place | house | 2           | :n-north-w
 
 211           | 2      | place | house | 6           | :n-north-e
 
 213           | osm_id | class   | type         | name                    | geometry
 
 214           | 2      | highway | unclassified | 'name' : 'Cloud Street' | :w-south
 
 217           | 1   | 1,100,101,102,2
 
 219           | osm_id | class   | type    | housenumber | street      | geometry
 
 220           | 1      | place   | houses  | even        | Cloud Street| :w-north
 
 222       Then table placex has no entry for W1
 
 223       And table location_property_osmline contains
 
 224           | object | parent_place_id | startnumber | endnumber
 
 226       When updating place ways
 
 227           | osm_id | class    | type  | housenumber | geometry
 
 228           | 1      | place    | house | 3           | :w-building
 
 229       Then table placex contains
 
 230           | object | parent_place_id
 
 233     Scenario: housenumbers added to interpolation
 
 234       Given the scene building-with-parallel-streets
 
 236           | osm_id | class   | type         | name                    | geometry
 
 237           | 2      | highway | unclassified | 'name' : 'Cloud Street' | :w-south
 
 240           | 1   | 1,100,101,102,2
 
 242           | osm_id | class   | type    | housenumber | geometry
 
 243           | 1      | place   | houses  | even        | :w-north
 
 245       Then table location_property_osmline has no entry for W1
 
 246       When updating place nodes
 
 247           | osm_id | class | type  | housenumber | geometry
 
 248           | 1      | place | house | 2           | :n-north-w
 
 249           | 2      | place | house | 6           | :n-north-e
 
 250       And updating place ways
 
 251           | osm_id | class   | type    | housenumber | street      | geometry
 
 252           | 1      | place   | houses  | even        | Cloud Street| :w-north
 
 253       Then table location_property_osmline contains
 
 254           | object | parent_place_id | startnumber | endnumber