Home > database >  All mysql how statistical libraries in longitude and latitude distance
All mysql how statistical libraries in longitude and latitude distance

Time:10-25

Library has thousands of latitude and longitude, the type double remaining,
What method can calculate the total distance of latitude and longitude, is how many meters in total in this way, similar to the statistics, the total length of add up the total length

CodePudding user response:


http://www.weitip.com/uploads/image/20190613/1560433521686376.png
 
2 * 6378.137 * ASIN (
SQRT (
POW (
SIN (
PI () * (111.86141967773438 - LNG)/360
),
2
(PI) + COS () * 33.07078170776367/180) * COS (lat * PI ()/180) (
* POWSIN (
PI () * (33.07078170776367 - lat)/360
),
2
)
)
)

CodePudding user response:

This,,,,,,,,,,,
  • Related