Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

City not found if admin boundary with same name exists #4756

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 9 comments
Closed

City not found if admin boundary with same name exists #4756

openstreetmap-trac opened this issue Jul 23, 2021 · 9 comments

Comments

@openstreetmap-trac
Copy link

Reporter: ppawel[at]fastmail.fm
[Submitted to the original trac issue database at 4.49pm, Wednesday, 23rd January 2013]

Test search:

http://nominatim.openstreetmap.org/search.php?q=olsztyn

It only shows city's boundary but does not show the city itself in the results.

Compare with this search:

http://nominatim.openstreetmap.org/search.php?q=kortowo

Here both the boundary and place are shown.

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 9.51am, Thursday, 24th January 2013]

That is completely intentional. Nominatim tries to merge boundaries and place nodes to avoid duplicate results.

@openstreetmap-trac
Copy link
Author

Author: ppawel[at]fastmail.fm
[Added to the original trac issue at 10.03am, Thursday, 24th January 2013]

Hmmm, but they are not merged in the second example. Also, when you change the name of relation or place, they are not merged.

Plus in the results Olsztyn city is listed as administrative boundary which is rather not intuitive - it looks like there's no city and what's worse in this example is that there's a village listed with the same name in other part of the country so it is confusing to look at those results. Perhaps it should be listed as a city?

@openstreetmap-trac
Copy link
Author

Author: ppawel[at]fastmail.fm
[Added to the original trac issue at 10.09am, Thursday, 24th January 2013]

Here's another example where it's not merged but relation/place data looks the same:

http://nominatim.openstreetmap.org/search.php?q=krak%C3%B3w

@openstreetmap-trac
Copy link
Author

Author: ppawel[at]fastmail.fm
[Added to the original trac issue at 7.15pm, Tuesday, 29th January 2013]

Could you please address my two comments I added after you closed the ticket? It seems that the current behavior is at least inconsistent (compare the example from the issue description and the one from comment 3).

@openstreetmap-trac
Copy link
Author

Author: twain
[Added to the original trac issue at 7.21pm, Tuesday, 29th January 2013]

Nominatim only automatically merges where the admin_level and the feature type match. In the cases you have given they don't match. This preserves the previous behaviour except in cases where they are very clearly duplicates.

You can manually tag them to merge (which is preferable) by adding the node to the relation as 'label'.

@openstreetmap-trac
Copy link
Author

Author: Yarl
[Added to the original trac issue at 1.34pm, Monday, 18th February 2013]

Only 'label' is detected? I think, that 'admin_centre' should also work, if there is no 'label' in relation.

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 1.56pm, Monday, 18th February 2013]

'admin_centre' works as well but only if the name of the place is the same as the name of the relation (because, for example, you wouldn't want the capital of a country be merged with the country itself). Most of the time, 'label' will be the better choice.

@openstreetmap-trac
Copy link
Author

Author: SQ9NIT
[Added to the original trac issue at 2.01pm, Monday, 18th February 2013]

Then why it merges Olsztyn, but not "Krakw"? For Krakw, there is place=city node in nominatim response, and for Olsztyn not.

Maybe there is possibility to add query flag - place=[0|1] - then nominatim will return not merged place and boundary?

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 2.14pm, Monday, 18th February 2013]

Actually, name and admin_level must match. In the Krakow case, one is the city the other one is the county, so not matching them up is completely correct. If county and city are actually the same then you must make that somehow clear with the tagging. The currently recommended way to map that is to add a second boundary relation with admin level 8.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant