跳转至

Calculate haversine distance(计算哈弗辛距离(haversine distance))

Supported in: Batch, Faster, Streaming

Calculates the haversine distance between two latitude and longitude point pairs in meters.

Expression categories: Geospatial

Declared arguments

  • Point a: Longitude and latitude for point b.
    Expression\
  • Point b: Longitude and latitude for point a.
    Expression\

Output type: Double

Examples

Example 1: Base case

Argument values:

  • Point a: point_a
  • Point b: point_b
point_a point_b Output
{
latitude: 41.507483,
longitude: -99.436554,
}
{
latitude: 38.504048,
longitude: -98.315949,
}
347328.82778977347
{
latitude: 22.308919,
longitude: 113.914603,
}
{
latitude: -33.946111,
longitude: 151.177222,
}
7393894.00134442


中文翻译


计算哈弗辛距离(haversine distance)

支持:批处理(Batch)、快速处理(Faster)、流处理(Streaming)

计算两个经纬度坐标点对之间的哈弗辛距离,单位为米。

表达式类别: 地理空间(Geospatial)

声明的参数

  • 点 a(Point a): 点 b 的经度和纬度。
    表达式\
  • 点 b(Point b): 点 a 的经度和纬度。
    表达式\

输出类型: 双精度浮点数(Double)

示例

示例 1:基础案例

参数值:

  • 点 a: point_a
  • 点 b: point_b
point_a point_b 输出
{
纬度(latitude):41.507483,
经度(longitude):-99.436554,
}
{
纬度:38.504048,
经度:-98.315949,
}
347328.82778977347
{
纬度:22.308919,
经度:113.914603,
}
{
纬度:-33.946111,
经度:151.177222,
}
7393894.00134442