]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/osm2pgsql/import/simple.feature
raise warning when invalid geomery is inserted
[nominatim.git] / test / bdd / osm2pgsql / import / simple.feature
1 @DB
2 Feature: Import of simple objects by osm2pgsql
3     Testing basic tagging in osm2pgsql imports.
4
5     Scenario: Import simple objects
6         When loading osm data
7           """
8           n1 Tamenity=prison,name=foo x34.3 y-23
9           n100 x0 y0
10           n101 x0 y0.1
11           n102 x0.1 y0.2
12           n200 x0 y0
13           n201 x0 y1
14           n202 x1 y1
15           n203 x1 y0
16           w1 Tshop=toys,name=tata Nn100,n101,n102
17           w2 Tref=45 Nn200,n201,n202,n203,n200
18           r1 Ttype=multipolygon,tourism=hotel,name=XZ Mn1@,w2@
19           """
20         Then place contains exactly
21           | object | class   | type   | name            | geometry |
22           | N1     | amenity | prison | 'name' : 'foo'  | 34.3 -23 |
23           | W1     | shop    | toys   | 'name' : 'tata' | 0 0, 0 0.1, 0.1 0.2 |
24           | R1     | tourism | hotel  | 'name' : 'XZ'   | (0 0, 0 1, 1 1, 1 0, 0 0) |
25
26     Scenario: Import object with two main tags
27         When loading osm data
28           """
29           n1 Ttourism=hotel,amenity=restaurant,name=foo
30           """
31         Then place contains
32           | object     | type       | name |
33           | N1:tourism | hotel      | 'name' : 'foo' |
34           | N1:amenity | restaurant | 'name' : 'foo' |
35
36     Scenario: Import stand-alone house number with postcode
37         When loading osm data
38           """
39           n1 Taddr:housenumber=4,addr:postcode=3345
40           """
41         Then place contains
42           | object | class | type |
43           | N1     | place | house |
44
45     Scenario: Landuses are only imported when named
46         When loading osm data
47           """
48           n100 x0 y0
49           n101 x0 y0.1
50           n102 x0.1 y0.1
51           n200 x0 y0
52           n202 x1 y1
53           n203 x1 y0
54           w1 Tlanduse=residential,name=rainbow Nn100,n101,n102,n100
55           w2 Tlanduse=residential              Nn200,n202,n203,n200
56           """
57         Then place contains exactly
58           | object | class   | type |
59           | W1     | landuse | residential |