2 Feature: Update of address interpolations
 
   3     Test the interpolated address are updated correctly
 
   5     Scenario: new interpolation added to existing street
 
   6       Given the scene parallel-road
 
   8           | osm | class   | type         | name         | geometry |
 
   9           | W2  | highway | unclassified | Sun Way      | :w-north |
 
  10           | W3  | highway | unclassified | Cloud Street | :w-south |
 
  13           | 10  | 1,100,101,102,2 |
 
  15       Then W10 expands to no interpolation
 
  17           | osm | class | type  | housenr | geometry |
 
  18           | N1  | place | house | 2       | :n-middle-w |
 
  19           | N2  | place | house | 6       | :n-middle-e |
 
  21           | osm | class | type   | addr+interpolation | geometry |
 
  22           | W10 | place | houses | even               | :w-middle |
 
  24           | object | parent_place_id |
 
  27       And W10 expands to interpolation
 
  28           | parent_place_id | start | end |
 
  31     Scenario: addr:street added to interpolation
 
  32       Given the scene parallel-road
 
  34           | osm | class | type  | housenr | geometry |
 
  35           | N1  | place | house | 2       | :n-middle-w |
 
  36           | N2  | place | house | 6       | :n-middle-e |
 
  38           | osm | class | type   | addr+interpolation | geometry |
 
  39           | W10 | place | houses | even   | :w-middle |
 
  41           | osm | class   | type         | name         | geometry |
 
  42           | W2  | highway | unclassified | Sun Way      | :w-north |
 
  43           | W3  | highway | unclassified | Cloud Street | :w-south |
 
  46           | 10  | 1,100,101,102,2 |
 
  49           | object | parent_place_id |
 
  52       And W10 expands to interpolation
 
  53           | parent_place_id | start | end |
 
  56           | osm | class   | type    | addr+interpolation | street       | geometry |
 
  57           | W10 | place   | houses  | even    | Cloud Street | :w-middle |
 
  59           | object | parent_place_id |
 
  62       And W10 expands to interpolation
 
  63           | parent_place_id | start | end |
 
  66     Scenario: addr:street added to housenumbers
 
  67       Given the scene parallel-road
 
  69           | osm | class | type  | housenr | geometry |
 
  70           | N1  | place | house | 2       | :n-middle-w |
 
  71           | N2  | place | house | 6       | :n-middle-e |
 
  73           | osm | class | type   | addr+interpolation | geometry |
 
  74           | W10 | place | houses | even   | :w-middle |
 
  76           | osm | class   | type         | name         | geometry |
 
  77           | W2  | highway | unclassified | Sun Way      | :w-north |
 
  78           | W3  | highway | unclassified | Cloud Street | :w-south |
 
  81           | 10  | 1,100,101,102,2 |
 
  84           | object | parent_place_id |
 
  87       And W10 expands to interpolation
 
  88           | parent_place_id | start | end |
 
  91           | osm | class | type  | street      | housenr | geometry |
 
  92           | N1  | place | house | Cloud Street| 2       | :n-middle-w |
 
  93           | N2  | place | house | Cloud Street| 6       | :n-middle-e |
 
  95           | object | parent_place_id |
 
  98       And W10 expands to interpolation
 
  99           | parent_place_id | start | end |
 
 102     Scenario: interpolation tag removed
 
 103       Given the scene parallel-road
 
 105           | osm | class | type  | housenr | geometry |
 
 106           | N1  | place | house | 2       | :n-middle-w |
 
 107           | N2  | place | house | 6       | :n-middle-e |
 
 109           | osm | class | type   | addr+interpolation | geometry |
 
 110           | W10 | place | houses | even   | :w-middle |
 
 112           | osm | class   | type         | name         | geometry |
 
 113           | W2  | highway | unclassified | Sun Way      | :w-north |
 
 114           | W3  | highway | unclassified | Cloud Street | :w-south |
 
 117           | 10  | 1,100,101,102,2 |
 
 120           | object | parent_place_id |
 
 123       And W10 expands to interpolation
 
 124           | parent_place_id | start | end |
 
 126       When marking for delete W10
 
 127       Then W10 expands to no interpolation
 
 129           | object | parent_place_id |
 
 133     Scenario: referenced road added
 
 134       Given the scene parallel-road
 
 136           | osm | class | type  | housenr | geometry |
 
 137           | N1  | place | house | 2       | :n-middle-w |
 
 138           | N2  | place | house | 6       | :n-middle-e |
 
 140           | osm | class   | type    | addr+interpolation | street      | geometry |
 
 141           | W10 | place   | houses  | even    | Cloud Street| :w-middle |
 
 143           | osm | class   | type         | name     | geometry |
 
 144           | W2  | highway | unclassified | Sun Way  | :w-north |
 
 147           | 10  | 1,100,101,102,2 |
 
 150           | object | parent_place_id |
 
 153       And W10 expands to interpolation
 
 154           | parent_place_id | start | end |
 
 157           | osm | class   | type         | name         | geometry |
 
 158           | W3  | highway | unclassified | Cloud Street | :w-south |
 
 160           | object | parent_place_id |
 
 163       And W10 expands to interpolation
 
 164           | parent_place_id | start | end |
 
 167     Scenario: referenced road deleted
 
 168       Given the scene parallel-road
 
 170           | osm | class | type  | housenr | geometry |
 
 171           | N1  | place | house | 2       | :n-middle-w |
 
 172           | N2  | place | house | 6       | :n-middle-e |
 
 174           | osm | class   | type    | addr+interpolation | street      | geometry |
 
 175           | W10 | place   | houses  | even    | Cloud Street| :w-middle |
 
 177           | osm | class   | type         | name         | geometry |
 
 178           | W2  | highway | unclassified | Sun Way      | :w-north |
 
 179           | W3  | highway | unclassified | Cloud Street | :w-south |
 
 182           | 10  | 1,100,101,102,2 |
 
 185           | object | parent_place_id |
 
 188       And W10 expands to interpolation
 
 189           | parent_place_id | start | end |
 
 191       When marking for delete W3
 
 193           | object | parent_place_id |
 
 196       And W10 expands to interpolation
 
 197           | parent_place_id | start | end |
 
 200     Scenario: building becomes interpolation
 
 201       Given the scene building-with-parallel-streets
 
 203           | osm | class    | type  | housenr | geometry |
 
 204           | W1  | place    | house | 3       | :w-building |
 
 206           | osm | class   | type         | name         | geometry |
 
 207           | W2  | highway | unclassified | Cloud Street | :w-south |
 
 210           | object | parent_place_id |
 
 214           | 1   | 1,100,101,102,2 |
 
 216           | osm | class | type  | housenr | geometry |
 
 217           | N1  | place | house | 2       | :n-north-w |
 
 218           | N2  | place | house | 6       | :n-north-e |
 
 220           | osm | class   | type    | addr+interpolation | street      | geometry |
 
 221           | W1  | place   | houses  | even    | Cloud Street| :w-north |
 
 222       Then placex has no entry for W1
 
 223       And W1 expands to interpolation
 
 224           | parent_place_id | start | end |
 
 227     Scenario: interpolation becomes building
 
 228       Given the scene building-with-parallel-streets
 
 230           | osm | class | type  | housenr | geometry |
 
 231           | N1  | place | house | 2       | :n-north-w |
 
 232           | N2  | place | house | 6       | :n-north-e |
 
 234           | osm | class   | type         | name         | geometry |
 
 235           | W2  | highway | unclassified | Cloud Street | :w-south |
 
 238           | 1   | 1,100,101,102,2 |
 
 240           | osm | class   | type    | addr+interpolation | street      | geometry |
 
 241           | W1  | place   | houses  | even    | Cloud Street| :w-north |
 
 243       Then placex has no entry for W1
 
 244       And W1 expands to interpolation
 
 245           | parent_place_id | start | end |
 
 248           | osm | class    | type  | housenr | geometry |
 
 249           | W1  | place    | house | 3       | :w-building |
 
 251           | object | parent_place_id |
 
 254     Scenario: housenumbers added to interpolation
 
 255       Given the scene building-with-parallel-streets
 
 257           | osm | class   | type         | name         | geometry |
 
 258           | W2  | highway | unclassified | Cloud Street | :w-south |
 
 261           | 1   | 1,100,101,102,2 |
 
 263           | osm | class   | type    | addr+interpolation | geometry |
 
 264           | W1  | place   | houses  | even    | :w-north |
 
 266       Then W1 expands to no interpolation
 
 268           | osm | class | type  | housenr | geometry |
 
 269           | N1  | place | house | 2       | :n-north-w |
 
 270           | N2  | place | house | 6       | :n-north-e |
 
 272           | osm | class   | type    | addr+interpolation | street      | geometry |
 
 273           | W1  | place   | houses  | even    | Cloud Street| :w-north |
 
 274       Then W1 expands to interpolation
 
 275           | parent_place_id | start | end |
 
 278     Scenario: housenumber added in middle of interpolation
 
 283           | osm | class   | type         | name         | geometry |
 
 284           | W1  | highway | unclassified | Cloud Street | 1, 2     |
 
 289           | osm | class   | type    | addr+interpolation | geometry |
 
 290           | W2  | place   | houses  | even    | 3,4,5    |
 
 292           | osm | class | type  | housenr |
 
 293           | N3  | place | house | 2       |
 
 294           | N5  | place | house | 10      |
 
 296       Then W2 expands to interpolation
 
 297           | parent_place_id | start | end | geometry |
 
 298           | W1              | 2     | 10  | 3,4,5    |
 
 300           | osm | class | type  | housenr |
 
 301           | N4  | place | house | 6       |
 
 302       Then W2 expands to interpolation
 
 303           | parent_place_id | start | end | geometry |
 
 305           | W1              | 6     | 10  | 4,5      |
 
 308     Scenario: housenumber removed in middle of interpolation
 
 313           | osm | class   | type         | name         | geometry |
 
 314           | W1  | highway | unclassified | Cloud Street | 1, 2     |
 
 319           | osm | class   | type    | addr+interpolation | geometry |
 
 320           | W2  | place   | houses  | even    | 3,4,5    |
 
 322           | osm | class | type  | housenr |
 
 323           | N3  | place | house | 2       |
 
 324           | N4  | place | house | 6       |
 
 325           | N5  | place | house | 10      |
 
 327       Then W2 expands to interpolation
 
 328           | parent_place_id | start | end | geometry |
 
 330           | W1              | 6     | 10  | 4,5      |
 
 331       When marking for delete N4
 
 332       Then W2 expands to interpolation
 
 333           | parent_place_id | start | end | geometry |
 
 334           | W1              | 2     | 10  | 3,4,5    |
 
 336     Scenario: Change the start housenumber
 
 341           | osm | class   | type         | name         | geometry |
 
 342           | W1  | highway | unclassified | Cloud Street | 1, 2     |
 
 347           | osm | class   | type    | addr+interpolation | geometry |
 
 348           | W2  | place   | houses  | even    | 3,4      |
 
 350           | osm | class | type  | housenr |
 
 351           | N3  | place | house | 2       |
 
 352           | N4  | place | house | 6       |
 
 354       Then W2 expands to interpolation
 
 355           | parent_place_id | start | end | geometry |
 
 358           | osm | class | type  | housenr |
 
 359           | N4  | place | house | 8       |
 
 360       Then W2 expands to interpolation
 
 361           | parent_place_id | start | end | geometry |