Offline reverse geocoding on iOS

雨燕双飞 提交于 2019-12-04 21:11:10

ReverseGeocodeCountry is a simple lightweight offline country reverse geocoder for iOS, it has a static JSON file with country polygon data that is used to reverse geocode any lat/lng:

https://github.com/krisrak/ios-offline-reverse-geocode-country

The "Countries of the World" is a .csv text file with countries, coordinates, localised country names, capitals and other information. It seems to be free to use. You just have to import it into an SQLite database.

Edit Just noticed you want reverse geocoding. The database would only be good for forward geocoding.

You can download shapefiles for all countries at http://www.gadm.org/download. If you download a .kmz, you can unpack it to a list of coordinates for the borders. You could probably take every 5th or 10th coordinate to get smaller size (with less accuracy).

Just in case I can suggest another good written offline geocoding library. https://github.com/Alterplay/APOfflineReverseGeocoding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!