This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Admin_centre separated from its boundary in search - my bad or Nominatim’s?

1

I've been entering level-8 (village) administrative boundaries in northern Serbia recently, using admin_centre/administrative boundary relations. On testing my changes, however, I noticed inconsistent behavior of Nominatim search:

For "good" ones, search immediately returns only one result: the relation containing both the village and its boundaries, e.g.:
Lipar
Stapar
For "bad" ones, search returns the village (point) separately from the boundary relation it belongs to, which is redundant and confusing:
Nova Crvenka (just 4 members)
Crvenka

I can't figure out if I'm doing anything wrong, or is it a bug/feature on Nominatim's side. All those relations seem to have identical structure member-wise and tag-wise, and I can't explain different behavior. There's a hint in FAQ that it might be due to some heuristics in Nominatim's algorithm (so I shouldn't worry), but I'd like to get a sanity check if I'm doing anything wrong first, if anyone feels like looking into it. Thanks.

asked 17 Jan '19, 10:58

Duja's gravatar image

Duja
56226
accept rate: 0%


2 Answers:

2

The tagging with role admin_centre looks good, Nominatim should've linked those together and returned only a single result. Can you add that to https://github.com/openstreetmap/Nominatim/issues ?

answered 18 Jan '19, 15:08

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

1

I seem to have figured it out. The problem was caused by naming: villages had canonical name in Serbian Cyrillic, while I populated the relations' names in Serbian Latin, as it was more convenient for me. I didn't think the relation names mattered. When I populated the whole set of transliterations for the boundary (Serbian Cyrillic, Serbian Latin, English), it started working as expected... although using just Cyrillic name seems to work as well

I'm still not sure how Nominatim did the "right" thing with the "good" relations, although their names were only in Latin all the way. Possibly has to do with transliterations, or who knows what. For example, when I populated Nova Crvenka in Cyrillic, adjacent Crvenka also started behaving, although I didn't touch it. Go figure...

answered 22 Jan '19, 11:35

Duja's gravatar image

Duja
56226
accept rate: 0%

Source code available on GitHub .