我的问题是基于question。使用它我写下面的代码,其中第一组坐标是纽约LGA机场,而第二组坐标是纽约EWR机场。我得到了答案33713.那是英里还是公里?一个快速谷歌检查说,距离应该是33英里(但它不是直线/弧距离:(这是一个公路的距离)。包documentation说答案是以米为单位。请澄清这是一个在2个坐标上找到地球距离的好方法吗?我如何在Miles中得到答案?
string = 'The Big Bang Theory S09E15 720p HDTV X264-DIMENSION'
dict = {'720p':'1080p'} # format 'substring':'replacement'
for key, value in dict.iteritems():
if key in string:
string.replace(key,value)
答案 0 :(得分:7)
是的,它以米为单位给你答案。要转换为里程:
> distm(c(40.777250, -73.872610), c(40.6895, -74.1745), fun = distHaversine)[,1] / 1609
[1] 20.95315
乌鸦飞过20.95英里。