I want to have a fast, lightweight and offline method to determine a country from a coordinates. I researched for a long time and found that there is boundary file in geojson format How can I use it in java? thank you
Asked
Active
Viewed 185 times
0
-
If you just want the country name, [this](https://stackoverflow.com/a/3660245/8244632) can help. It's not based on coordinates but it will provide the country name in which the device is present. Or you can use [this](https://github.com/AReallyGoodName/OfflineReverseGeocode) reverse geocoder [offline], may be helpful. – Lalit Fauzdar Sep 17 '17 at 11:44
-
@LalitSinghFauzdar, thanks but I do mean any coordinate. For OfflineReverseGeocode, it is overkilled because the overhead is too big (even the cities1000 file) to load in some devices, it also gives approx city which I don't need it – DayDayHappy Sep 17 '17 at 12:29
1 Answers
0
I found PolyUtil can do the job to test a coordinate if it belongs to a polygon, but the source data are not accurate enough for the world country boundaries.

DayDayHappy
- 1,679
- 1
- 15
- 26