]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/osm2pgsql/import/interpolation.feature
prepare release 5.2.0.post15
[nominatim.git] / test / bdd / features / osm2pgsql / import / interpolation.feature
1 Feature: Import of interpolations
2     Test if interpolation objects are correctly imported into the
3     place_interpolation table
4
5     Background:
6         Given the grid
7             | 1 | 2 |
8             | 4 | 3 |
9
10     Scenario: Simple address interpolations
11         When loading osm data
12             """
13             n1
14             n2
15             w13001 Taddr:interpolation=odd,addr:street=Blumenstrasse Nn1,n2
16             w13002 Taddr:interpolation=even,place=city Nn1,n2
17             w13003 Taddr:interpolation=odd Nn1,n1
18             """
19         Then place contains exactly
20             | object | class | type |
21             | W13002 | place | city |
22         And place_interpolation contains exactly
23             | osm_id | type | address!dict              | nodes!ints | geometry!wkt |
24             | 13001  | odd  | "street": "Blumenstrasse" | 1,2        | 1,2          |
25             | 13002  | even | -                         | 1,2        | 1,2          |
26
27     Scenario: Address interpolation with housenumber
28         When loading osm data
29             """
30             n1
31             n2
32             n3
33             n4
34             w34 Taddr:interpolation=all,addr:housenumber=2-4,building=yes Nn1,n2,n3,n4,n1
35             w35 Taddr:interpolation=all,addr:housenumber=5,building=yes Nn1,n2,n3,n4,n1
36             w36 Taddr:interpolation=all,addr:housenumber=2a-c Nn1,n2,n3,n4,n1
37             """
38         Then place contains exactly
39             | object | class    | type  | address!dict                                |
40             | W35    | building | yes   | "housenumber": "5", "interpolation": "all" |
41             | W34    | building | yes   | "housenumber": "2-4", "interpolation": "all" |
42             | W36    | place    | house | "housenumber": "2a-c", "interpolation": "all" |