[GIS] Techniques for offline reverse geocoding on a mobile device

geocodingmobilereverse-geocoding

I am working on a mobile mapping application (currently iOS, eventually Android) – and I am struggling with how to best support reverse geocoding from lat/long to Country/State without using an online service.

Apple's reverse GeoCoding API depends on Google as the backend, and works great while connected. I could achieve similar functionality using the Open Street Maps project too.

What I really want however is to create a C library that I can call even when offline from within my application, passing in the GPS coordinates, and having it return the country and/or state at those coordinates.

I've seen examples of how to do this on a server, but never anything appropriate for a mobile device.

What are some techniques to accomplish this?

Best Answer

I've answered to that kind of question there: https://stackoverflow.com/questions/4373730/is-there-an-offline-geocoding-framework-library-or-database-for-ios/4419113#4419113

The compilation of spatialite under iOS is not that easy. I struggled for a while before having something that works OK.

I have made a pdf file that explains the steps required to compile spatialite (+GEOS and PROJ4 that are required to get spatial indexes working properly with spatialite), I made the compilation of the whole stuff under XCode.

If you're interested in such PDF, just tell me, I can send it to you.