| W3 | 14 | 14 |
When sending search query "16 Cloud Street"
Then results contain
- | ID | osm_type | osm_id |
- | 0 | N | 4 |
+ | ID | osm |
+ | 0 | N4 |
When sending search query "14 Cloud Street"
Then results contain
- | ID | osm_type | osm_id |
- | 0 | W | 11 |
+ | ID | osm |
+ | 0 | W11 |
Scenario: addr:street on housenumber way
Given the grid
| W3 | 14 | 14 |
When sending search query "16 Cloud Street"
Then results contain
- | ID | osm_type | osm_id |
- | 0 | N | 4 |
+ | ID | osm |
+ | 0 | N4 |
When sending search query "14 Cloud Street"
Then results contain
- | ID | osm_type | osm_id |
- | 0 | W | 11 |
+ | ID | osm |
+ | 0 | W11 |
Scenario: Geometry of points and way don't match (github #253)
Given the places
| 2 | 8 | 10,11 |
When sending jsonv2 reverse coordinates 1,1
Then results contain
- | ID | osm_type | osm_id | type | display_name |
- | 0 | node | 1 | house | 0 |
+ | ID | osm | type | display_name |
+ | 0 | N1 | house | 0 |
Scenario: Parenting of interpolation with additional tags
Given the grid
| R23 | - |
When sending search query "rhein"
Then results contain
- | osm_type |
- | R |
+ | osm |
+ | R13 |
Scenario: Relations are not linked when in waterway relations
Given the grid
| R2 | - |
When sending search query "rhein"
Then results contain
- | ID | osm_type |
- | 0 | R |
- | 1 | W |
+ | ID | osm |
+ | 0 | R1 |
+ | 1 | W2 |
Scenario: Empty waterway relations are handled correctly
| W2 | R1 |
When sending search query "rhein2"
Then results contain
- | osm_type |
- | W |
+ | osm |
+ | W1 |
# github #573
Scenario: Boundaries should only be linked to places
| city |
| Berlin |
Then results contain
- | ID | osm_type | osm_id |
- | 0 | R | 13 |
+ | ID | osm |
+ | 0 | R13 |
When sending search query ""
| state |
| Berlin |
Then results contain
- | ID | osm_type | osm_id |
- | 0 | R | 13 |
+ | ID | osm |
+ | 0 | R13 |
Scenario: Boundaries without place tags only link against same admin level
| state |
| Berlin |
Then results contain
- | ID | osm_type | osm_id |
- | 0 | R | 13 |
+ | ID | osm |
+ | 0 | R13 |
When sending search query ""
| city |
| Berlin |
Then results contain
- | ID | osm_type | osm_id |
- | 0 | N | 2 |
+ | ID | osm |
+ | 0 | N2 |
# github #1352
Scenario: Do not use linked centroid when it is outside the area
| N2 | W1 |
When sending search query "4 galoo"
Then results contain
- | ID | osm_type | osm_id | display_name |
- | 0 | N | 1 | 4, galoo, 12345, Deutschland |
+ | ID | osm | display_name |
+ | 0 | N1 | 4, galoo, 12345, Deutschland |
When sending search query "5 galoo"
Then results contain
- | ID | osm_type | osm_id | display_name |
- | 0 | N | 2 | 5, galoo, 99999, Deutschland |
+ | ID | osm | display_name |
+ | 0 | N2 | 5, galoo, 99999, Deutschland |
Scenario: Address without tags, closest street
Given the grid
And the places
| osm | class | type | housenr | geometry |
| N1 | place | house | 2 | 1 |
- | N3 | place | house | 16 | 3 |
+ | N3 | place | house | 18 | 3 |
And the ways
| id | nodes |
| 1 | 1,3 |
| dups |
| 1 |
Then results contain
- | osm_type |
- | R |
+ | osm |
+ | R1 |
When updating places
| osm | class | type | name | admin | geometry |
| R1 | boundary | administrative | foobar | 8 | (10,11,12,13,10) |
| dups |
| 1 |
Then results contain
- | osm_type |
- | N |
+ | osm |
+ | N1 |
Scenario: Add linked place when linking relation is removed
Given the 0.1 grid
| dups |
| 1 |
Then results contain
- | osm_type |
- | R |
+ | osm |
+ | R1 |
When marking for delete R1
Then placex contains
| object | linked_place_id |
| dups |
| 1 |
Then results contain
- | osm_type |
- | N |
+ | osm |
+ | N1 |
Scenario: Remove linked place when linking relation is added
Given the 0.1 grid
| dups |
| 1 |
Then results contain
- | osm_type |
- | N |
+ | osm |
+ | N1 |
When updating places
| osm | class | type | name | admin | geometry |
| R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
| dups |
| 1 |
Then results contain
- | osm_type |
- | R |
+ | osm |
+ | R1 |
Scenario: Remove linked place when linking relation is renamed
Given the 0.1 grid
| dups |
| 1 |
Then results contain
- | osm_type |
- | N |
+ | osm |
+ | N1 |
When updating places
| osm | class | type | name | admin | geometry |
| R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
| dups |
| 1 |
Then results contain
- | osm_type |
- | R |
+ | osm |
+ | R1 |
Scenario: Update linking relation when linkee name is updated
Given the 0.1 grid
elif name == 'osm':
self.check_row_field(i, 'osm_type', OsmType(value[0]))
self.check_row_field(i, 'osm_id', Field(value[1:]))
- elif name == 'osm_type':
- self.check_row_field(i, 'osm_type', OsmType(value[0]))
elif name == 'centroid':
if ' ' in value:
lon, lat = value.split(' ')
lon, lat = context.osm.grid_node(int(value))
else:
raise RuntimeError("Context needed when using grid coordinates")
- self.check_row_field(i, 'lat', Field(float(lat)), base=subdict)
- self.check_row_field(i, 'lon', Field(float(lon)), base=subdict)
+ self.check_row_field(i, 'lat', Field(float(lat)))
+ self.check_row_field(i, 'lon', Field(float(lon)))
elif '+' in name:
self.assert_subfield(i, name.split('+'), value)
else: