Skip to content

Commit

Permalink
Merge pull request #3619 from lonvia/demote-farms
Browse files Browse the repository at this point in the history
Remove farms and isolated dwellings from computed addresses
  • Loading branch information
lonvia authored Dec 22, 2024
2 parents f76dbb0 + cad44eb commit 14ecfc7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions settings/address-levels.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
31 changes: 31 additions & 0 deletions test/bdd/db/import/rank_computation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

0 comments on commit 14ecfc7

Please sign in to comment.