Lookup country for GPS coordinates without Internet access

旧时模样 提交于 2019-12-04 11:24:25

问题


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 with GIS, I guess I'd need some kind of module that would statically store shapes of countries and match current location against them.

I'd therefore like to ask what kind of tools would be best for this, and what is the best way to obtain the country data. I'm using Python on an embedded Linux box.


回答1:


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.




回答2:


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.




回答3:


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




回答4:


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?



来源:https://stackoverflow.com/questions/3643929/lookup-country-for-gps-coordinates-without-internet-access

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