thampiman / reverse-geocoder

A fast, offline reverse geocoder in Python
GNU Lesser General Public License v2.1
1.87k stars 160 forks source link

Geocoder wrong results for Switzerland coordinate #41

Open pavelsimo opened 5 years ago

pavelsimo commented 5 years ago

Consider the following coordinate:

46.601255, 10.422899 https://goo.gl/maps/jEzFrvcGmMQ2

The "reverse-geocoder" library report this coordinates is located in Italy (IT) when the actual location is Switzerland (CH).

thampiman commented 5 years ago

@pavelsimo There is an issue with locations near the border. Since the library is based on the GeoNames database, it finds a city that's closest in terms of Euclidean distance. In order to circumvent this, I've added support for custom data sources and have blogged about it here: http://ajaythampi.com/blog/2016/9/16/reverse-geocoding-custom-data-sources. Hope this helps.