是否有用于Python的GPS库? [英] Is there any GPS library for use in Python?
问题描述
我正在寻找Python库,它可以使用GPS坐标。比方说,我有一个坐标列表:
>>> gps = [
...(53.25012925,-6.24479338,349.9,'2011-08-20T09:35:00Z'),
...(53.25028285,-6.24441800,359.9,'2011-08 -20T09:35:30Z'),
...(53.25049500,-6.24266032,395.9,'2011-08-20T09:36:00Z'),
...#等等。 。
...]
>>>
我想计算平均速度,距离,获得最高点和其他信息。我知道,计算它非常简单,但我想知道是否有任何现有代码(我不喜欢重新发明轮子)。
注意:有是类似的问题在这里在stackoverflow(哪个gps库你会推荐python? ),但它是关于GPSD的。我没有使用任何设备,我只是在文本文件中使用GPS坐标。
a href =http://code.google.com/p/geopy/ =nofollow> geopy 。它可以计算两个GPS点之间的距离(它使用大圆距离和Vincenty距离方法)。最重要的是,geopy 可以进行地理编码(它可以从地址获得GPS坐标)。其他功能(平均速度,最高点等)我可以自己破解。
I am looking for Python library, which can work with GPS coordinates. Let's say, I have a list of coordinates:
>>> gps = [
... (53.25012925, −6.24479338, 349.9, '2011-08-20T09:35:00Z'),
... (53.25028285, -6.24441800, 359.9, '2011-08-20T09:35:30Z'),
... (53.25049500, -6.24266032, 395.9, '2011-08-20T09:36:00Z'),
... # and so on...
... ]
>>>
I would like to compute average speed, distance, get the higest point, and other info. I know, it is quite simple to compute it, but I am wondering if there is any existing code (I do not like to reinvent the wheel).
Note: There is similar question here in stackoverflow (Which gps library would you recommend for python?), but it is about GPSD. I am not working with any device, I just have GPS coordinates in text file.
I have found an interesting library named geopy. It can calculate distances between two GPS points (it uses great-circle distance and Vincenty distance methods). On top of that, geopy can do geocoding (it can get GPS coordinates from an address).
The other features (average speed, higest point, etc.) I can hack by myself.
这篇关于是否有用于Python的GPS库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!