HAVERSINE(Lakehouse v1)
ハーヴァサイン公式を使用して、地球表面上の2点間の大円距離をキロメートルで計算します。2点は、度単位の緯度と経度で指定します。
SQL Syntax
Section titled “SQL Syntax”HAVERSINE(<lat1>, <lon1>, <lat2>, <lon2>)| 引数 | 説明 |
|---|---|
<lat1> |
1つ目の点の緯度。 |
<lon1> |
1つ目の点の経度。 |
<lat2> |
2つ目の点の緯度。 |
<lon2> |
2つ目の点の経度。 |
Double。
SQL Examples
Section titled “SQL Examples”SELECT HAVERSINE(40.7127, -74.0059, 34.0500, -118.2500) AS distance
┌────────────────┐│ distance │├────────────────┤│ 3936.390533556 │└────────────────┘