I develop an Android app that lets people upload a picture and tag it. When the picture's EXIF data has GPS coordinates in Japan, I would like to add #japan to the tag suggestions.


  • 100% Java library
  • Input: latitude, longitude
  • Output: Country name in English (even better if other languages are available)
  • Size: Below 2 MB, as it is not a central feature and I want to keep the app small (the whole app is currently 2MB)
  • Precision: About 100 kilometers.
  • Response time: Less than half second even on a cheap phone
  • Must work offline
  • Free and open source


  • In border areas, giving several countries is OK, for instance for a picture taken in Luxembourg (tiny country) it could suggest France,Germany,Luxembourg,Belgium. Giving only one suggestion is OK too.
  • Out-of-date borders is not a big problem. No update mechanism is needed as the app itself gets updated quite regularly.
  • Behavior at sea is not important, so using one big rectangle (or circle) for New Zealand is OK, for instance.

Keyword: reverse geocoding

1 Answer 1


6 years later, still no such library, so I just created one and released it as open source:


  • Works offline
  • Response time: Less than 100 milliseconds
  • Size: 100 kilobytes
  • Does not hoard any RAM
  • Precision is about 0.2 degrees

Example usage:

Coordinates2Country.country(50.1, 10.2) returns "Germany".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.