我正在开发一个应用程序,其中一个要求是我能够基于 GPS 数据执行实时反向地理编码操作.特别是,我必须能够确定纬度、经度对映射到的州/省,并检测我们何时从一个州/省移动到另一个州/省.
I am working on an application where one of the requirements is that I be able to perform realtime reverse geocoding operations based on GPS data. In particular, I must be able to determine the state/province to which a latitude, longitude pair maps and detect when we have moved from one state/province to another.
到目前为止,我有几个想法,但想知道是否有人对以下任何一个有任何想法:
I have a couple ideas so far but wondered if anyone had any ideas on either of the following:
首先,我有两个主要想法:
As a starter, here are the two main ideas I have:
我正在为感兴趣的人或那些可能有他们想要建议的好库的人工作.
I am working in python for the interested or those that might have a nice library they would like to suggest.
明确一点...我没有可用的网络访问权限,因此在运行时不能使用现有的反向地理编码服务
我建议使用你第一个想法的变体:使用 空间索引.空间索引是从矩形构建的数据结构,将纬度/经度映射到有效负载.在这种情况下,您可能会将矩形映射到州-省对.R-tree 可能是一个不错的选择.这是一个 R-tree python 包.您可以通过比较连续搜索的结果来检测漫游.
I suggest using a variant of your first idea: Use a spatial index. A spatial index is a data structure built from rectangles, mapping lat/long to the payload. In this case you will probably map rectangles to state-province pairs. An R-tree may be a good option. Here's an R-tree python package. You could detect roaming by comparing the results of consecutive searches.
这篇关于无需 Web 访问的反向地理编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!