openzim / openzim/maps

Geonames DB does not always has hierarchy information

Open
#109 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug question
Dominant language
Python
Stars
19
Forks
5
Avg merge
4m
Merged PRs (30d)
2

Description

#107 showed that Geonames DB which we use to fetch places and their hierarchy relationships sometimes miss hierarchy information

#108 applied on patch on that to at least create a fully functional ZIM with only few direct search entry missing.

For india for instance:

[maps2zim::MainThread::2026-04-28 13:21:16,405] INFO:  Processing geonames allCountries entries
[maps2zim::MainThread::2026-04-28 13:21:44,292] INFO:  Loaded 26166 unique place names for a total of 29256 places
[maps2zim::MainThread::2026-04-28 13:21:44,299] INFO:  Parsing hierarchy file
[maps2zim::MainThread::2026-04-28 13:21:44,541] INFO:  Parsing country info file
[maps2zim::MainThread::2026-04-28 13:21:44,568] INFO:  Progress 10 / 26176
[maps2zim::MainThread::2026-04-28 13:21:46,743] WARNING:Not adding duplicate place Gongri in title search: 8578975,8746090
[maps2zim::MainThread::2026-04-28 13:21:46,754] WARNING:Not adding duplicate place Najin in title search: 8741156,8746080
[maps2zim::MainThread::2026-04-28 13:21:46,757] WARNING:Not adding duplicate place Xiongba in title search: 8745930,8745990
[maps2zim::MainThread::2026-04-28 13:21:46,758] WARNING:Not adding duplicate place Yare in title search: 8745931,8745943
[maps2zim::MainThread::2026-04-28 13:21:46,761] WARNING:Not adding duplicate place Pianji in title search: 8745940,8745988
[maps2zim::MainThread::2026-04-28 13:21:46,767] WARNING:Not adding duplicate place Quluo in title search: 8745959,8745992
[maps2zim::MainThread::2026-04-28 13:21:46,778] WARNING:Not adding duplicate place Gangga in title search: 8745979,8746134
[maps2zim::MainThread::2026-04-28 13:21:46,789] WARNING:Not adding duplicate place Xiongmei in title search: 8746013,8746050
[maps2zim::MainThread::2026-04-28 13:21:46,790] WARNING:Not adding duplicate place Zhaxigang in title search: 8746015,8746020,8746097
[maps2zim::MainThread::2026-04-28 13:21:46,817] WARNING:Not adding duplicate place Cuoduo in title search: 8746107,8746136
[maps2zim::MainThread::2026-04-28 13:21:54,568] INFO:  Progress 23904 / 26176
[maps2zim::MainThread::2026-04-28 13:21:55,204] WARNING:Not adding duplicate place Siraha (district) in title search: 12095581,12097001
[maps2zim::MainThread::2026-04-28 13:21:55,213] WARNING:Not adding duplicate place Meringden in title search: 12095563,12095997
[maps2zim::MainThread::2026-04-28 13:21:55,234] WARNING:Not adding duplicate place Tatopani in title search: 12095614,12095645
[maps2zim::MainThread::2026-04-28 13:21:55,340] WARNING:Not adding duplicate place Sammarimai in title search: 12095951,12096023
[maps2zim::MainThread::2026-04-28 13:21:55,356] WARNING:Not adding duplicate place Makalu in title search: 12096006,12096223
[maps2zim::MainThread::2026-04-28 13:21:55,394] WARNING:Not adding duplicate place Bansagadhi in title search: 12096139,12096142
[maps2zim::MainThread::2026-04-28 13:21:55,512] INFO:  Added 29223 redirects and 2027 disambiguation pages

E.g. for Siraha search these are the results:

Image

And this is the disambiguation page:

Image

I have no suggestion ATM besides:

  • living with a moderately severe issue
  • switch to another place DB (but it is not like there are many on the free market, I don't have one to suggest ATM)

@kelson42 WDYT? Is this a showstopper for the release in your perspective?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Geonames hierarchy handling described in issues #107 and #108, then reproduce the India example and inspect the generated search and disambiguation results. Done means missing hierarchy information is handled without the reported duplicate or missing direct search entries, with the behavior verified on a representative dataset.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.