From: Sarah Hoffmann Date: Sun, 22 Dec 2024 08:13:42 +0000 (+0100) Subject: Merge pull request #3619 from lonvia/demote-farms X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/14ecfc78344bec4c044770e823246f5a40253d41?hp=f76dbb0a167fa49839c30da1a4e1d15439070e2a Merge pull request #3619 from lonvia/demote-farms Remove farms and isolated dwellings from computed addresses --- diff --git a/settings/address-levels.json b/settings/address-levels.json index a82133ef..322ff707 100644 --- a/settings/address-levels.json +++ b/settings/address-levels.json @@ -23,8 +23,8 @@ "allotments" : 22, "neighbourhood" : [20, 22], "quarter" : [20, 22], - "isolated_dwelling" : [22, 20], - "farm" : [22, 20], + "isolated_dwelling" : [22, 25], + "farm" : [22, 25], "city_block" : 25, "mountain_pass" : 25, "square" : 25, diff --git a/test/bdd/db/import/rank_computation.feature b/test/bdd/db/import/rank_computation.feature index df01fd91..0fce3e71 100644 --- a/test/bdd/db/import/rank_computation.feature +++ b/test/bdd/db/import/rank_computation.feature @@ -267,3 +267,34 @@ Feature: Rank assignment | object | rank_search | rank_address | | N23:amenity | 30 | 30 | | N23:place | 16 | 16 | + + Scenario: Address rank 25 is only used for addr:place + Given the grid + | 10 | 33 | 34 | 11 | + Given the places + | osm | class | type | name | + | N10 | place | village | vil | + | N11 | place | farm | farm | + And the places + | osm | class | type | name | geometry | + | W1 | highway | residential | RD | 33,11 | + And the places + | osm | class | type | name | addr+farm | geometry | + | W2 | highway | residential | RD2 | farm | 34,11 | + And the places + | osm | class | type | housenr | + | N33 | place | house | 23 | + And the places + | osm | class | type | housenr | addr+place | + | N34 | place | house | 23 | farm | + When importing + Then placex contains + | object | parent_place_id | + | N11 | N10 | + | N33 | W1 | + | N34 | N11 | + And place_addressline contains + | object | address | + | W1 | N10 | + | W2 | N10 | + | W2 | N11 |