How to find distance from the latitude and longitude of two locations?

后端 未结 12 2418
情歌与酒
情歌与酒 2020-11-29 02:40

I have a set of latitudes and longitudes of locations.

  • How to find distance from one location in the set to another?
  • Is there a f
12条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-29 02:50

    I am done using SQL query

    select *, (acos(sin(input_lat* 0.01745329)*sin(lattitude *0.01745329) + cos(input_lat *0.01745329)*cos(lattitude *0.01745329)*cos((input_long -longitude)*0.01745329))* 57.29577951 )* 69.16 As D  from table_name 
    

提交回复
热议问题