Create GeoPoint(创建地理点(GeoPoint))¶
Supported in: Batch, Faster, Streaming
Creates a GeoPoint column from a latitude and longitude column. Validates that the latitude parameter is between -90 and 90, inclusive, and that the longitude parameter is between -180 and 180, inclusive; if not, returns a null value.
Expression categories: Geospatial
Declared arguments¶
- Latitude: Latitude column.
Expression\ - Longitude: Longitude column.
Expression\
Output type: GeoPoint
Examples¶
Example 1: Base case¶
Argument values:
- Latitude:
lat - Longitude:
lon
| lat | lon | Output |
|---|---|---|
| 32.0 | 58.0 | { latitude -> 32.0, longitude -> 58.0, } |
| 320.0 | 58.0 | null |
Example 2: Null case¶
Argument values:
- Latitude:
lat - Longitude:
lon
| lat | lon | Output |
|---|---|---|
| null | null | null |
| null | 58.0 | null |
| 32.0 | null | null |
| NaN | 30.0 | null |
中文翻译¶
创建地理点(GeoPoint)¶
支持:批量(Batch)、快速(Faster)、流式(Streaming)
根据纬度和经度列创建地理点(GeoPoint)列。验证纬度参数是否在 -90 到 90 之间(含边界值),经度参数是否在 -180 到 180 之间(含边界值);若超出范围则返回空值。
表达式类别: 地理空间(Geospatial)
声明参数¶
- 纬度(Latitude): 纬度列。
表达式\ - 经度(Longitude): 经度列。
表达式\
输出类型: GeoPoint
示例¶
示例 1:基础情况¶
参数值:
- 纬度:
lat - 经度:
lon
| lat | lon | 输出 |
|---|---|---|
| 32.0 | 58.0 | { latitude -> 32.0, longitude -> 58.0, } |
| 320.0 | 58.0 | null |
示例 2:空值情况¶
参数值:
- 纬度:
lat - 经度:
lon
| lat | lon | 输出 |
|---|---|---|
| null | null | null |
| null | 58.0 | null |
| 32.0 | null | null |
| NaN | 30.0 | null |