Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#4756 closed defect (invalid)

City not found if admin boundary with same name exists

Reported by: ppawel@… Owned by: geocoding@…
Priority: minor Milestone:
Component: nominatim Version:
Keywords: Cc:


Test search:

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

Compare with this search:

Here both the boundary and place are shown.

Change History (9)

comment:1 Changed 8 years ago by Sarah Hoffmann

Resolution: invalid
Status: newclosed

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

comment:2 Changed 8 years ago by ppawel@…

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?

comment:3 Changed 8 years ago by ppawel@…

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

comment:4 Changed 8 years ago by ppawel@…

Resolution: invalid
Status: closedreopened

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).

comment:5 Changed 8 years ago by twain

Resolution: invalid
Status: reopenedclosed

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'.

comment:6 Changed 7 years ago by Yarl

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

comment:7 Changed 7 years ago by Sarah Hoffmann

'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.

comment:8 Changed 7 years ago by SQ9NIT

Then why it merges Olsztyn, but not "Kraków"? For Kraków, 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?

comment:9 Changed 7 years ago by Sarah Hoffmann

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.

Note: See TracTickets for help on using tickets.