Lookup country for GPS coordinates without Internet access

后端 未结 4 871
滥情空心
滥情空心 2021-02-09 11:34

I need to find out in what country given GPS coordinates are, on a device that has no Internet access (e.g. this, but without the easy on-line solution). Having no experience wi

相关标签:
4条回答
  • 2021-02-09 12:15

    Have you seen https://github.com/krisrak/ios-offline-reverse-geocode-country/? all offline ... no need for any APIs super fast . accuracy not guaranteed !!

    0 讨论(0)
  • 2021-02-09 12:28

    You would need a map with the boundaries of each country. Then, given a coordinate, you would need to calculate in which boundary the point fell. Of course, the two challenges there are collecting the data and representing it, and doing the math to find where a point falls.

    Does anyone know how Yahoo does it? Could you possibly port their approach locally?

    0 讨论(0)
  • 2021-02-09 12:34

    There's a shape file here with all of the country borders. You can then use OGR or something like this to access the data.

    0 讨论(0)
  • 2021-02-09 12:40

    You might have a look at the GeoDjango documentation even if you aren't making a web application. The tutorial covers importing the world boundaries shapefile.

    0 讨论(0)
提交回复
热议问题