minor fixes for geometry compuation during boundary ranking

Go back to using centroid when determining if one admin level
is within another. There are cases where boundaries are slightly
misaligned due to mapping errors (not using the same ways in the
relations).

Only declare boundaries the same when they have the same wikidata
tag _and_ have exactly the same geometry. This works around tagging
errors with the wikidata tag, which happen because of automated
edits to the wikidata tag.
This commit is contained in:
Sarah Hoffmann
2020-10-23 10:43:57 +02:00
parent 7a16909219
commit 95f83b90d2
2 changed files with 22 additions and 5 deletions

View File

@@ -101,6 +101,20 @@ Feature: Rank assignment
| R21 | R20 | 16 |
| R22 | R20 | 16 |
Scenario: Admin levels cannot overtake each other due to place address ranks even when slightly misaligned
Given the named places
| osm | class | type | admin | extra+place | geometry |
| R20 | boundary | administrative | 6 | town | (0 0, 0 2, 2 2, 2 0, 0 0) |
| R21 | boundary | administrative | 8 | | (0 0, -0.0001 1, 1 1, 1 0, 0 0) |
When importing
Then placex contains
| object | rank_search | rank_address |
| R20 | 12 | 16 |
| R21 | 16 | 18 |
Then place_addressline contains
| object | address | cached_rank_address |
| R21 | R20 | 16 |
Scenario: Admin levels must not be larger than 25
Given the named places
| osm | class | type | admin | extra+place | geometry |