New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
country_code of Kosovo: rs vs xk #567
Comments
I'm changing the title as 'found incorrect data' isn't precise enough. |
OK |
If it helps, here's what I saw when I looked at Kosovo a week or so ago: http://www.openstreetmap.org/relation/2088990#map=8/42.567/20.901 http://osm.mapki.com/history/relation.php?id=2088990 There's no "RS" anywhere there. The "rs" that appears greyed-out at http://nominatim.openstreetmap.org/details.php?place_id=159334847 I've always interpreted as "somewhere nearby" (but I'm no Nominatim expert, obviously). The Kosovo relation has: and the Serbia relation has: So is it possible that a missing "ISO3166-1" for Kosovo is the problem? |
Kosovo currently isn't in Nominatim's base country table. This table has been generated manually and needs to be redone at some point. |
I am a software developer with lot of background in databases. From: Sarah Hoffmann [mailto:notifications@github.com] Kosovo currently isn't in Nominatim's base country table https://github.com/twain47/Nominatim/blob/master/data/country_osm_grid.sql . This table has been generated manually and needs to be redone at some point. — |
From: Sarah Hoffmann [mailto:notifications@github.com] Kosovo currently isn't in Nominatim's base country table https://github.com/twain47/Nominatim/blob/master/data/country_osm_grid.sql . This table has been generated manually and needs to be redone at some point. — I prepared but I am not sure should I get it though git and then commit so I am attaching here Kosovo xk "name"=>"Kosova", "name:af"=>"Kosovo", "name:am"=>"ኮሶቮ", "name:an"=>"Kosovo", "name:ar"=>"كوسوفو", "name:az"=>"Kosovo", "name:be"=>"Косава", "name:bg"=>"Косово", "name:bn"=>"কসোভো", "name:br"=>"Kosovo", "name:bs"=>"Kosovo", "name:ca"=>"Kosovo", "name:ce"=>"Косово", "name:co"=>"Kosovo", "name:cs"=>"Kosovo", "name:cv"=>"Косово ", "name:cy"=>"Kosovo", "name:da"=>"Albanien", "name:de"=>"Kosovo", "name:ee"=>"Kosovo", "name:el"=>"Κόσοβο", "name:en"=>"Kosovo", "name:eo"=>"Kosovo", "name:es"=>"Kosovo", "name:et"=>"Kosovo", "name:eu"=>"Kosovo", "name:fa"=>"کوسوو", "name:fi"=>"Kosovo", "name:fo"=>"Kosovo", "name:fr"=>"Kosovo", "name:fy"=>"Kosovo", "name:ga"=>"Cosaiv", "name:gd"=>"Cosobho", "name:gl"=>"Kosovo", "name:gn"=>"Kosovo", "name:gv"=>"Kosovo", "name:he"=>"קוסובו", "name:hi"=>"कोसोवो", "name:hr"=>"Kosovo", "name:ht"=>"Kosovo", "name:hu"=>"Koszovó", "name:hy"=>"Կոսովո", "name:id"=>"Kosovo", "name:ie"=>"Kosovo", "name:io"=>"Kosovo", "name:is"=>"Kosóvó", "name:it"=>"Kosovo", "name:ja"=>"コソボ", "name:jv"=>"Kosovo", "name:ka"=>"კოსოვო", "name:kg"=>"Kosovo", "name:kk"=>"Косово", "name:km"=>"កូសូវ៉ូ ", "name:kn"=>"ಕೊಸೊವೊ", "name:ko"=>"코소보", "name:ku"=>"Kosovo", "name:kv"=>"Косово", "name:ky"=>"Косово", "name:la"=>"Kosovia", "name:lb"=>"Kosovo", "name:li"=>"Kosovo", "name:ln"=>"Kosovo", "name:lt"=>"Kosovas", "name:lv"=>"Kosova", "name:mg"=>"Kosovo", "name:mk"=>"Косово", "name:ml"=>"കൊസോവോ", "name:mn"=>"Косово", "name:mr"=>"कोसोव्हो", "name:ms"=>"Kosovo", "name:mt"=>"Kosovo", "name:na"=>"Kosovo", "name:ne"=>"कोसोभो", "name:nl"=>"Kosovo", "name:nn"=>"Kosovo", "name:no"=>"Kosovo", "name:oc"=>"Kosova", "name:os"=>"Kосово", "name:pl"=>"Kosowo", "name:ps"=>"کوسوو", "name:pt"=>"Kosovo", "name:qu"=>"Kusuwu", "name:rm"=>"Cosovo", "name:ro"=>"Kosovo", "name:ru"=>"Косово", "name:sc"=>"Kòssovu", "name:se"=>"Kosovo", "name:sh"=>"Kosovo", "name:sk"=>"Kosovo", "name:sl"=>"Kosovo", "name:sq"=>"Kosova", "name:sr"=>"Косово", "name:su"=>"Kosovo", "name:sv"=>"Kosovo", "name:sw"=>"Kosovo", "name:ta"=>"கொசோவோ", "name:te"=>"కొసావో", "name:tg"=>"Косово", "name:th"=>"โคโซโว", "name:tl"=>"Kosovo", "name:tr"=>"Kosova", "name:tt"=>"Косово", "name:uk"=>"Косово", "name:ur"=>"کوسوو", "name:uz"=>"Kosovo", "name:vi"=>"Kosovo", "name:wo"=>"Kosovo", "name:yi"=>"קאָסאָווע", "name:yo"=>"Kósófò", "name:zh"=>"科索沃", "name:ace"=>"Kosovo", "name:als"=>"Kosova", "name:ang"=>"Kosovo", "name:arz"=>"كوسوڤو", "name:ast"=>"Kosovo", "name:bar"=>"Kosovo", "name:bcl"=>"Kosobo", "name:ceb"=>"Kosovo", "name:chr"=>"ᎪᏗᏉ", "name:crh"=>"Kosovo", "name:csb"=>"Kosovo", "name:diq"=>"Kosova", "name:dsb"=>"Kosowo", "name:eml"=>"Kosovo", "name:ext"=>"Cosovu", "name:frp"=>"Kosovo", "name:haw"=>"Kosowo", "name:hsb"=>"Коsоvо", "name:ilo"=>"Kosovo", "name:lad"=>"Kosovo", "name:lij"=>"Kosovo", "name:lmo"=>"Kosovo", "name:mzn"=>"کوزوو", "name:nah"=>"Cosovo", "name:nds"=>"Kosovo", "name:nov"=>"Kosovo", "name:pam"=>"Kosovo", "name:pdc"=>"Kosovo", "name:pih"=>"Kosovo", "name:pms"=>"Kosovo", "name:pnb"=>"ਕੋਸੋਵੋ", "name:pnt"=>"Κόσοβο", "name:rmy"=>"Kosovo", "name:sah"=>"Косовa", "name:scn"=>"Kòssuvu", "name:sco"=>"Kosovo", "name:srn"=>"Kosovokondre", "name:stq"=>"Kosovo", "name:szl"=>"Kosowo", "name:tet"=>"Kosovo", "name:tpi"=>"Kosovo", "name:udm"=>"Косово", "name:vec"=>"Kosovo", "name:war"=>"Kosovo", "name:wuu"=>"科索沃", "name:xal"=>"Косово", "name:zea"=>"Kosovo", "name:zh_py"=>"科索沃", "name:simple"=>"Kosovo", "name:zh-yue"=>"科索沃", "name:zh_pyt"=>"科索沃", "name:bat-smg"=>"Kuosuovs", "name:fiu-vro"=>"Kosovo", "name:roa-rup"=>"Cosova", "name:be-x-old"=>"Kosovo", "official_name"=>"Republika e Kosovës", "name:zh-min-nan"=>"Kosova", "official_name:be"=>"Рэспубліка Косово", "official_name:el"=>"Δημοκρατία της Κόσοβος", "official_name:en"=>"Republic of Kosovo", "official_name:es"=>"República de Kosovo", "official_name:et"=>"Kosovo Vabariik", "official_name:fr"=>"République d'Kosovo", "official_name:ja"=>"アルバニア共和国", "official_name:lb"=>"Republik Kosovo", "official_name:pl"=>"Republika Kosovo", "official_name:pt"=>"República da Kosovo", "official_name:sk"=>"Kosovo republika", "official_name:sv"=>"Republiken Kosovo", "official_name:vi"=>"Cộng hoà Kosovo" xk 10 |
The table I was referring to contains the geometry of the country. |
Currently Kosovo hasn't done demarcation with all neighbors so the Geometry can be with errors. |
@lonvia just wondering what are the next steps here? Does someone need to download and install Nominatim, figure out the format of https://github.com/twain47/Nominatim/blob/master/data/country_osm_grid.sql?raw=true , edit Serbia in there and create a new entry for Kosovo based on the existing OSM borders? If so, is there any documentation that could help with that process, and does anything else need doing to link to "new country"? Pardon my ignorance of Nominatim here; I'm aware of it only as a black box that things go into and things come out of... Presumably there are other country issues too (https://trac.openstreetmap.org/ticket/5305#ticket has been around for a while; is e.g. South Sudan a "country" in Nominatim too?). |
To be honest, I don't know exactly (incidentally that's what's the biggest blocker for this issue at the moment). country_osm_grid contains the polygons made from OSM administrative boundaries and split into convenient squares for faster lookup. There is a script that creates the table from an existing Nominatim database. So roughly the following needs to be done:
Note that the country_osm_grid.sql file has become a bit too large to host in a github repo, so we'll probably have to host an updated version somewhere else. So if somebody wants to take this update on, I would prefer to get a PR for country_name.sql only and have the grid table separate. Bonus points if you can also provide a visual diff between the old and the new content of country_osm_grid. |
http://nominatim.openstreetmap.org/search?q=Gjilan&format=json&polygon=0&addressdetails=1
[{"place_id":"1244873","licence":"Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright","osm_type":"node","osm_id":"299448609","boundingbox":["42.3034051","42.6234051","21.308409","21.628409"],"lat":"42.4634051","lon":"21.468409","display_name":"Gjilan, Komuna e Gjilanit, Kosova","class":"place","type":"city","importance":0.57239695346006,"icon":"http://nominatim.openstreetmap.org/images/mapicons/poi_place_city.p.20.png","address":{"city":"Gjilan","county":"Komuna e Gjilanit","country":"Kosova","country_code":"rs"}},{"place_id":"74039569","licence":"Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright","osm_type":"way","osm_id":"38167080","boundingbox":["42.4616075","42.462677","21.468622","21.4704886"],"lat":"42.4622523","lon":"21.4696809","display_name":"Xhemë Tupalla, Gjilan, Komuna e Gjilanit, 60000, Kosova","class":"highway","type":"residential","importance":0.21,"address":{"road":"Xhemë Tupalla","city":"Gjilan","county":"Komuna e Gjilanit","postcode":"60000","country":"Kosova","country_code":"rs"}},{"place_id":"12931878","licence":"Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright","osm_type":"node","osm_id":"1222862561","boundingbox":["42.6306937","42.6307937","21.1499652","21.1500652"],"lat":"42.6307437","lon":"21.1500152","display_name":"Gjilan, Rrafshi i Kosovës, Lagja NIC, Чаглавица, Komuna e Prishtinës, 38000, Kosova","class":"highway","type":"motorway_junction","importance":0.111,"address":{"junction":"Gjilan","road":"Rrafshi i Kosovës","suburb":"Lagja NIC","village":"Чаглавица","county":"Komuna e Prishtinës","postcode":"38000","country":"Kosova","country_code":"rs"}}]
This is the JSON returned form the link
But Country code is "rs" while it should be "xk".
The text was updated successfully, but these errors were encountered: