2 Feature: Import of address interpolations
 
   3     Tests that interpolated addresses are added correctly
 
   5     Scenario: Simple even interpolation line with two points
 
   7           | osm | class | type   | housenr | geometry |
 
   8           | N1  | place | house  | 2       | 1 1 |
 
   9           | N2  | place | house  | 6       | 1 1.001 |
 
  11           | osm | class | type   | addr+interpolation | geometry |
 
  12           | W1  | place | houses | even    | 1 1, 1 1.001 |
 
  17         Then W1 expands to interpolation
 
  18           | start | end | geometry |
 
  19           | 2     | 6   | 1 1, 1 1.001 |
 
  21     Scenario: Backwards even two point interpolation line
 
  23           | osm | class | type   | housenr | geometry |
 
  24           | N1  | place | house  | 2       | 1 1 |
 
  25           | N2  | place | house  | 6       | 1 1.001 |
 
  27           | osm | class | type   | addr+interpolation | geometry |
 
  28           | W1  | place | houses | even    | 1 1.001, 1 1 |
 
  33         Then W1 expands to interpolation
 
  34           | start | end | geometry |
 
  35           | 2     | 6   | 1 1, 1 1.001 |
 
  37     Scenario: Simple odd two point interpolation
 
  39           | osm | class | type   | housenr | geometry |
 
  40           | N1  | place | house  | 1       | 1 1 |
 
  41           | N2  | place | house  | 11      | 1 1.001 |
 
  43           | osm | class | type   | addr+interpolation | geometry |
 
  44           | W1  | place | houses | odd     | 1 1, 1 1.001 |
 
  49         Then W1 expands to interpolation
 
  50           | start | end | geometry |
 
  51           | 1     | 11  | 1 1, 1 1.001 |
 
  53     Scenario: Simple all two point interpolation
 
  55           | osm | class | type   | housenr | geometry |
 
  56           | N1  | place | house  | 1       | 1 1 |
 
  57           | N2  | place | house  | 3       | 1 1.001 |
 
  59           | osm | class | type   | addr+interpolation | geometry |
 
  60           | W1  | place | houses | all     | 1 1, 1 1.001 |
 
  65         Then W1 expands to interpolation
 
  66           | start | end | geometry |
 
  67           | 1     | 3   | 1 1, 1 1.001 |
 
  69     Scenario: Even two point interpolation line with intermediate empty node
 
  71           | osm | class | type   | housenr | geometry |
 
  72           | N1  | place | house  | 2       | 1 1 |
 
  73           | N2  | place | house  | 10      | 1.001 1.001 |
 
  75           | osm | class | type   | addr+interpolation | geometry |
 
  76           | W1  | place | houses | even    | 1 1, 1 1.001, 1.001 1.001 |
 
  81         Then W1 expands to interpolation
 
  82           | start | end | geometry |
 
  83           | 2     | 10  | 1 1, 1 1.001, 1.001 1.001 |
 
  85     Scenario: Even two point interpolation line with intermediate duplicated empty node
 
  87           | osm | class | type   | housenr | geometry |
 
  88           | N1  | place | house  | 2       | 1 1 |
 
  89           | N2  | place | house  | 10      | 1.001 1.001 |
 
  91           | osm | class | type   | addr+interpolation | geometry |
 
  92           | W1  | place | houses | even    | 1 1, 1 1.001, 1.001 1.001 |
 
  97         Then W1 expands to interpolation
 
  98           | start | end | geometry |
 
  99           | 2     | 10  | 1 1, 1 1.001, 1.001 1.001 |
 
 101     Scenario: Simple even three point interpolation line
 
 103           | osm | class | type   | housenr | geometry |
 
 104           | N1  | place | house  | 2       | 1 1 |
 
 105           | N2  | place | house  | 14      | 1.001 1.001 |
 
 106           | N3  | place | house  | 10      | 1 1.001 |
 
 108           | osm | class | type   | addr+interpolation | geometry |
 
 109           | W1  | place | houses | even    | 1 1, 1 1.001, 1.001 1.001 |
 
 114         Then W1 expands to interpolation
 
 115           | start | end | geometry |
 
 116           | 2     | 10  | 1 1, 1 1.001 |
 
 117           | 10    | 14  | 1 1.001, 1.001 1.001 |
 
 119     Scenario: Simple even four point interpolation line
 
 121           | osm | class | type  | housenr | geometry |
 
 122           | N1  | place | house | 2       | 1 1 |
 
 123           | N2  | place | house | 14      | 1.001 1.001 |
 
 124           | N3  | place | house | 10      | 1 1.001 |
 
 125           | N4  | place | house | 18      | 1.001 1.002 |
 
 127           | osm | class | type   | addr+interpolation | geometry |
 
 128           | W1  | place | houses | even    | 1 1, 1 1.001, 1.001 1.001, 1.001 1.002 |
 
 133         Then W1 expands to interpolation
 
 134           | start | end | geometry |
 
 135           | 2     | 10  | 1 1, 1 1.001 |
 
 136           | 10    | 14  | 1 1.001, 1.001 1.001 |
 
 137           | 14    | 18  | 1.001 1.001, 1.001 1.002 |
 
 139     Scenario: Reverse simple even three point interpolation line
 
 141           | osm | class | type  | housenr | geometry |
 
 142           | N1  | place | house | 2       | 1 1 |
 
 143           | N2  | place | house | 14      | 1.001 1.001 |
 
 144           | N3  | place | house | 10      | 1 1.001 |
 
 146           | osm | class | type   | addr+interpolation | geometry |
 
 147           | W1  | place | houses | even    | 1.001 1.001, 1 1.001, 1 1 |
 
 152         Then W1 expands to interpolation
 
 153           | start | end | geometry |
 
 154           | 2     | 10  | 1 1, 1 1.001 |
 
 155           | 10    | 14  | 1 1.001, 1.001 1.001 |
 
 157     Scenario: Even three point interpolation line with odd center point
 
 159           | osm | class | type  | housenr | geometry |
 
 160           | N1  | place | house | 2       | 1 1 |
 
 161           | N2  | place | house | 8       | 1.001 1.001 |
 
 162           | N3  | place | house | 7       | 1 1.001 |
 
 164           | osm | class | type   | addr+interpolation | geometry |
 
 165           | W1  | place | houses | even    | 1 1, 1 1.001, 1.001 1.001 |
 
 170         Then W1 expands to interpolation
 
 171           | start | end | geometry |
 
 172           | 2     | 7   | 1 1, 1 1.001 |
 
 173           | 7     | 8   | 1 1.001, 1.001 1.001 |
 
 175     Scenario: Interpolation line with self-intersecting way
 
 177           | osm | class | type  | housenr | geometry |
 
 178           | N1  | place | house | 2       | 0 0 |
 
 179           | N2  | place | house | 6       | 0 0.001 |
 
 180           | N3  | place | house | 10      | 0 0.002 |
 
 182           | osm | class | type   | addr+interpolation | geometry |
 
 183           | W1  | place | houses | even    | 0 0, 0 0.001, 0 0.002, 0 0.001 |
 
 188         Then W1 expands to interpolation
 
 189           | start | end | geometry |
 
 190           | 2     | 6   | 0 0, 0 0.001 |
 
 191           | 6     | 10  | 0 0.001, 0 0.002 |
 
 192           | 6     | 10  | 0 0.001, 0 0.002 |
 
 194     Scenario: Interpolation line with self-intersecting way II
 
 196           | osm | class | type  | housenr | geometry |
 
 197           | N1  | place | house | 2       | 0 0 |
 
 198           | N2  | place | house | 6       | 0 0.001 |
 
 200           | osm | class | type   | addr+interpolation | geometry |
 
 201           | W1  | place | houses | even    | 0 0, 0 0.001, 0 0.002, 0 0.001 |
 
 206         Then W1 expands to interpolation
 
 207           | start | end | geometry |
 
 208           | 2     | 6   | 0 0, 0 0.001 |
 
 210     Scenario: addr:street on interpolation way
 
 211         Given the scene parallel-road
 
 213           | osm | class | type  | housenr | geometry |
 
 214           | N1  | place | house | 2       | :n-middle-w |
 
 215           | N2  | place | house | 6       | :n-middle-e |
 
 216           | N3  | place | house | 12      | :n-middle-w |
 
 217           | N4  | place | house | 16      | :n-middle-e |
 
 219           | osm | class   | type    | addr+interpolation | street       | geometry |
 
 220           | W10 | place   | houses  | even    |              | :w-middle |
 
 221           | W11 | place   | houses  | even    | Cloud Street | :w-middle |
 
 223           | osm | class   | type     | name         | geometry |
 
 224           | W2  | highway | tertiary | Sun Way      | :w-north |
 
 225           | W3  | highway | tertiary | Cloud Street | :w-south |
 
 228           | 10  | 1,100,101,102,2 |
 
 229           | 11  | 3,200,201,202,4 |
 
 232           | object | parent_place_id |
 
 237         Then W10 expands to interpolation
 
 238           | parent_place_id | start | end |
 
 240         Then W11 expands to interpolation
 
 241           | parent_place_id | start | end |
 
 243         When searching for "16 Cloud Street"
 
 245          | ID | osm_type | osm_id |
 
 247         When searching for "14 Cloud Street"
 
 249          | ID | osm_type | osm_id |
 
 252     Scenario: addr:street on housenumber way
 
 253         Given the scene parallel-road
 
 255           | osm | class | type  | housenr | street       | geometry |
 
 256           | N1  | place | house | 2       |              | :n-middle-w |
 
 257           | N2  | place | house | 6       |              | :n-middle-e |
 
 258           | N3  | place | house | 12      | Cloud Street | :n-middle-w |
 
 259           | N4  | place | house | 16      | Cloud Street | :n-middle-e |
 
 261           | osm | class   | type    | addr+interpolation | geometry |
 
 262           | W10 | place   | houses  | even               | :w-middle |
 
 263           | W11 | place   | houses  | even               | :w-middle |
 
 265           | osm | class   | type     | name         | geometry |
 
 266           | W2  | highway | tertiary | Sun Way      | :w-north |
 
 267           | W3  | highway | tertiary | Cloud Street | :w-south |
 
 270           | 10  | 1,100,101,102,2 |
 
 271           | 11  | 3,200,201,202,4 |
 
 274           | object | parent_place_id |
 
 279         Then W10 expands to interpolation
 
 280           | parent_place_id | start | end |
 
 282         Then W11 expands to interpolation
 
 283           | parent_place_id | start | end |
 
 285         When searching for "16 Cloud Street"
 
 287          | ID | osm_type | osm_id |
 
 289         When searching for "14 Cloud Street"
 
 291          | ID | osm_type | osm_id |
 
 294     Scenario: Geometry of points and way don't match (github #253)
 
 296           | osm | class | type        | housenr | geometry |
 
 297           | N1  | place | house       | 10      | 144.9632341 -37.76163 |
 
 298           | N2  | place | house       | 6       | 144.9630541 -37.7628174 |
 
 299           | N3  | shop  | supermarket | 2       | 144.9629794 -37.7630755 |
 
 301           | osm | class | type   | addr+interpolation | geometry |
 
 302           | W1  | place | houses | even    | 144.9632341 -37.76163,144.9630541 -37.7628172,144.9629794 -37.7630755 |
 
 307         Then W1 expands to interpolation
 
 308           | start | end | geometry |
 
 309           | 2     | 6   | 144.9629794 -37.7630755, 144.9630541 -37.7628174 |
 
 310           | 6     | 10  | 144.9630541 -37.7628174, 144.9632341 -37.76163 |
 
 312     Scenario: Place with missing address information
 
 316           | osm | class   | type   | housenr |
 
 317           | N1  | place   | house  | 23      |
 
 318           | N2  | amenity | school |         |
 
 319           | N3  | place   | house  | 29      |
 
 321           | osm | class | type   | addr+interpolation | geometry |
 
 322           | W1  | place | houses | odd                | 1,2,3 |
 
 327         Then W1 expands to interpolation
 
 328           | start | end | geometry |
 
 331     Scenario: Ways without node entries are ignored
 
 333           | osm | class | type   | housenr | geometry |
 
 334           | W1  | place | houses | even    | 1 1, 1 1.001 |
 
 336         Then W1 expands to no interpolation
 
 338     Scenario: Ways without nodes without housenumbers are ignored
 
 340           | osm | class | type   | housenr | geometry |
 
 341           | N1  | place | house  |         | 1 1 |
 
 342           | N2  | place | house  |         | 1 1.001 |
 
 343           | W1  | place | houses | even    | 1 1, 1 1.001 |
 
 345         Then W1 expands to no interpolation