Techniques for offline reverse geocoding on a mobile device?

流过昼夜 提交于 2019-12-01 13:42:32

Radven

You will need to get the Shapefiles (lat/lng outline) of all the administrative entities (US states, countries, etc). There are a lot of public domain sources for these. For example, the NOAA has shapefiles for US states and territories you can download:

http://www.nws.noaa.gov/geodata/catalog/national/html/us_state.htm

Once you got the shapefiles, you can use a shapefile reader to test if a lat/lng is within a shape. There are open source readers in C, just google. I seen stuff at sourceforge for shapefiles, but have not used these myself.

The Team at OpenGeoCode.Org

If you're looking for an approach based on a quadtree, try Yggdrasil. It generates a quadtree based on country polygon data. A Ruby example script can be found here.

I can suggest good written offline geocoding 3rd party library. https://github.com/Alterplay/APOfflineReverseGeocoding

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