Open thomersch opened 4 years ago
I cleaned up the database entry, but the issue might arise in the future again. Since the filter now supports ISO codes (e.g. DE, US etc), we could use some fixed list.
@thomersch The issue is currently present. I've also noted
"Czech Republic", "Czechia"
"DR Congo", "Democratic Republic of the Congo"
"TW", "Taiwan"
Yeah, this will pop up again and again, since we're just using OSM data.
I looked whether we could use ISO 3166 lists (e.g. https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes/blob/master/all/all.csv), but I haven't found a consistent one. This one for example says "Moldova, Republic of" and "United Kingdom of Great Britain and Northern Ireland", but most countries are addressed by their shorthand name, e.g. "Germany".
I'd rather also not display just two letter ISO codes, but have proper labels.
Maybe we could get a different data source, like Wikidata or Natural Earth. We don't even need geometries, just sane labels would suffice. If someone could come up with e.g. a Wikidata SPARQL query, this would make me very happy (or at least, less sad).
In the location filter dropdown, the US is listed twice: as "United States" and "United States of America":
We just take display all the available countries in the database in alphabetical order. Those values are coming from Nominatim, thus being highly dependent on consistent tagging in OSM. We should consider whether to implement a synonym list or trying to clean up values somehow.
What is being used? (an OSM key?)
https://www.openstreetmap.org/relation/148838
have not checked other instances of similar name (read: island/islet, boundary etc.)
https://www.openstreetmap.org/relation/51684
int_name
, name:en
https://www.openstreetmap.org/relation/192795
short_name:en
https://www.openstreetmap.org/relation/449220
short_name
, short_name:en
data/country_name.sql
(country code, name, default language, partition)
locationSet
geoJSONs from iD/location-conflation(, or use country-coder at the bottom).Currently, osmcal uses the country
attribute from Nominatim. (Geocoding code, Display code)
The information about the SQL from Nominatim file seems to be outdated. They've since moved to a different system, but that seems to be quite reasonable. It's a list of all countries, even with translations: https://github.com/osm-search/Nominatim/blob/master/settings/country_settings.yaml
Now we just need a system to get this into osmcal.
There are also countries that have no ISO code, like Kosovo, which uses the temporary code XK.
In the location filter dropdown, the US is listed twice: as "United States" and "United States of America":
We just take display all the available countries in the database in alphabetical order. Those values are coming from Nominatim, thus being highly dependent on consistent tagging in OSM. We should consider whether to implement a synonym list or trying to clean up values somehow.