Nominatim
Nominatim copied to clipboard
Return country results, even when the country is not imported
Discussed in https://github.com/osm-search/Nominatim/discussions/2675
Originally posted by mausch April 20, 2022 Hi, what data do I need to import into my Nominatim instance to resolve country names? e.g. in the public instance I can query this and get the expected result: https://nominatim.openstreetmap.org/ui/search.html?q=united+states But if I run that query on my instance I get some result in South Africa just because I have imported https://download.geofabrik.de/africa/south-africa.html but I don't have the US in my database. I don't want to import the whole planet but surely it should be possible to resolve country names without needing to import everything?
Nominatim always needs an OSM object to return. If you only import an extract, then it can still use the fallback names, to find out that you where looking for the country, but it doesn't have the relevant data to return. I admit that this is not very satisfying.
Nominatim could return an artificial object instead made up of the information from the country_name table. That would need to be implemented, of course.