Get bearing from start point to end point(获取从起点到终点的方位角(bearing))¶
Supported in: Batch, Faster, Streaming
Calculates the absolute true bearing (clockwise angle relative to geographical north) from the first point to the second point in degrees using a spherical approximation of the earth.
Expression categories: Geospatial
Declared arguments¶
- Ending point: Longitude and latitude for the ending point.
Expression\ - Starting point: Longitude and latitude for the starting point.
Expression\
Output type: Double
Examples¶
Example 1: Base case¶
Argument values:
- Ending point:
end_point - Starting point:
start_point
| start_point | end_point | Output |
|---|---|---|
| { latitude: 40.69325025929194, longitude: -74.00522662934995, } |
{ latitude: 51.4988509390695, longitude: -0.1238396067697046, } |
51.20964213763489 |
Example 2: Edge case¶
Argument values:
- Ending point:
end_point - Starting point:
start_point
| start_point | end_point | Output |
|---|---|---|
| { latitude: -41.304077, longitude: 174.75, } |
{ latitude: -31.304077, longitude: 174.749, } |
359.99507958062 |
Example 3: Edge case¶
Argument values:
- Ending point:
end_point - Starting point:
start_point
| start_point | end_point | Output |
|---|---|---|
| { latitude: -41.304077, longitude: 174.75, } |
{ latitude: -31.304077, longitude: 174.75, } |
0.0 |
Example 4: Edge case¶
Argument values:
- Ending point:
end_point - Starting point:
start_point
| start_point | end_point | Output |
|---|---|---|
| { latitude: -41.304077, longitude: 174.774535, } |
{ latitude: 37.42984400901383, longitude: -122.16950590121428, } |
45.56453711814595 |
Example 5: Edge case¶
Argument values:
- Ending point:
end_point - Starting point:
start_point
| start_point | end_point | Output |
|---|---|---|
| null | null | null |
Example 6: Edge case¶
Argument values:
- Ending point:
end_point - Starting point:
start_point
| start_point | end_point | Output |
|---|---|---|
| { latitude: 48.8567, longitude: 2.3508, } |
{ latitude: 48.8567, longitude: 2.3508, } |
0.0 |
中文翻译¶
获取从起点到终点的方位角(bearing)¶
支持:批处理(Batch)、快速处理(Faster)、流处理(Streaming)
计算从第一个点到第二个点的绝对真方位角(true bearing,即相对于地理北极的顺时针角度),单位为度,采用地球球面近似模型。
表达式类别: 地理空间(Geospatial)
声明的参数¶
- 终点(Ending point): 终点的经度和纬度。
表达式\ - 起点(Starting point): 起点的经度和纬度。
表达式\
输出类型: Double
示例¶
示例 1:基本情况¶
参数值:
- 终点:
end_point - 起点:
start_point
| start_point | end_point | 输出 |
|---|---|---|
| { latitude: 40.69325025929194, longitude: -74.00522662934995, } |
{ latitude: 51.4988509390695, longitude: -0.1238396067697046, } |
51.20964213763489 |
示例 2:边界情况¶
参数值:
- 终点:
end_point - 起点:
start_point
| start_point | end_point | 输出 |
|---|---|---|
| { latitude: -41.304077, longitude: 174.75, } |
{ latitude: -31.304077, longitude: 174.749, } |
359.99507958062 |
示例 3:边界情况¶
参数值:
- 终点:
end_point - 起点:
start_point
| start_point | end_point | 输出 |
|---|---|---|
| { latitude: -41.304077, longitude: 174.75, } |
{ latitude: -31.304077, longitude: 174.75, } |
0.0 |
示例 4:边界情况¶
参数值:
- 终点:
end_point - 起点:
start_point
| start_point | end_point | 输出 |
|---|---|---|
| { latitude: -41.304077, longitude: 174.774535, } |
{ latitude: 37.42984400901383, longitude: -122.16950590121428, } |
45.56453711814595 |
示例 5:边界情况¶
参数值:
- 终点:
end_point - 起点:
start_point
| start_point | end_point | 输出 |
|---|---|---|
| null | null | null |
示例 6:边界情况¶
参数值:
- 终点:
end_point - 起点:
start_point
| start_point | end_point | 输出 |
|---|---|---|
| { latitude: 48.8567, longitude: 2.3508, } |
{ latitude: 48.8567, longitude: 2.3508, } |
0.0 |