Skip to content

Commit cad44eb

Browse files
committed
remove farms and isolated dwellings from computed addresses
Farms and isolated dwellings are usually confined to a very small area. It does not make sense if they are automatically used in addressing surrounding features. Still works to use them for parenting when used with addr:place.
1 parent f76dbb0 commit cad44eb

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

Diff for: settings/address-levels.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"allotments" : 22,
2424
"neighbourhood" : [20, 22],
2525
"quarter" : [20, 22],
26-
"isolated_dwelling" : [22, 20],
27-
"farm" : [22, 20],
26+
"isolated_dwelling" : [22, 25],
27+
"farm" : [22, 25],
2828
"city_block" : 25,
2929
"mountain_pass" : 25,
3030
"square" : 25,

Diff for: test/bdd/db/import/rank_computation.feature

+31
Original file line numberDiff line numberDiff line change
@@ -267,3 +267,34 @@ Feature: Rank assignment
267267
| object | rank_search | rank_address |
268268
| N23:amenity | 30 | 30 |
269269
| N23:place | 16 | 16 |
270+
271+
Scenario: Address rank 25 is only used for addr:place
272+
Given the grid
273+
| 10 | 33 | 34 | 11 |
274+
Given the places
275+
| osm | class | type | name |
276+
| N10 | place | village | vil |
277+
| N11 | place | farm | farm |
278+
And the places
279+
| osm | class | type | name | geometry |
280+
| W1 | highway | residential | RD | 33,11 |
281+
And the places
282+
| osm | class | type | name | addr+farm | geometry |
283+
| W2 | highway | residential | RD2 | farm | 34,11 |
284+
And the places
285+
| osm | class | type | housenr |
286+
| N33 | place | house | 23 |
287+
And the places
288+
| osm | class | type | housenr | addr+place |
289+
| N34 | place | house | 23 | farm |
290+
When importing
291+
Then placex contains
292+
| object | parent_place_id |
293+
| N11 | N10 |
294+
| N33 | W1 |
295+
| N34 | N11 |
296+
And place_addressline contains
297+
| object | address |
298+
| W1 | N10 |
299+
| W2 | N10 |
300+
| W2 | N11 |

0 commit comments

Comments
 (0)