Grouped latitude/longitude bounding box(分组经纬度边界框(Grouped latitude/longitude bounding box))¶
Supported in: Batch
Returns a struct containing the entire bounding box of all valid geometries in the given column. Invalid geometries are treated as null and ignored.
Expression categories: Geospatial
Declared arguments¶
- Expression: Column of geometries to compute the entire bounding box of.
Expression\
Output type: LatLonBoundingBox
Examples¶
Example 1: Base case¶
Argument values:
- Expression:
geometry
Given input table:
| geometry |
|---|
| {"type":"LineString","coordinates":[[1,0],[0,8.4]]} |
| {"type":"Point","coordinates":[125.6, -92.3]} |
| {"type":"Polygon","coordinates":[[[0,0],[1,6.3],[-6,1],[0,0]]]} |
Outputs: {
maxLat -> 8.4,
maxLon -> 125.6,
minLat -> -92.3,
minLon -> -6.0,
}
Example 2: Null case¶
Argument values:
- Expression:
geometry
Given input table:
| geometry |
|---|
| null |
Outputs: null
Example 3: Edge case¶
Argument values:
- Expression:
geometry
Given input table:
| geometry |
|---|
| Invalid GeoJSON |
| {"type":"LineString","coordinates":[[2,0],[0,4.8]]} |
Outputs: {
maxLat -> 4.8,
maxLon -> 2.0,
minLat -> 0.0,
minLon -> 0.0,
}
中文翻译¶
分组经纬度边界框(Grouped latitude/longitude bounding box)¶
支持:批处理模式(Batch)
返回一个结构体,包含指定列中所有有效几何图形的完整边界框。无效几何图形将被视为空值并忽略。
表达式类别: 地理空间(Geospatial)
声明参数¶
- 表达式(Expression): 用于计算完整边界框的几何图形列。
表达式\
输出类型: LatLonBoundingBox
示例¶
示例1:基础情况¶
参数值:
- 表达式:
geometry
输入表:
| geometry |
|---|
| {"type":"LineString","coordinates":[[1,0],[0,8.4]]} |
| {"type":"Point","coordinates":[125.6, -92.3]} |
| {"type":"Polygon","coordinates":[[[0,0],[1,6.3],[-6,1],[0,0]]]} |
输出结果: {
maxLat -> 8.4,
maxLon -> 125.6,
minLat -> -92.3,
minLon -> -6.0,
}
示例2:空值情况¶
参数值:
- 表达式:
geometry
输入表:
| geometry |
|---|
| null |
输出结果: null
示例3:边界情况¶
参数值:
- 表达式:
geometry
输入表:
| geometry |
|---|
| 无效的GeoJSON |
| {"type":"LineString","coordinates":[[2,0],[0,4.8]]} |
输出结果: {
maxLat -> 4.8,
maxLon -> 2.0,
minLat -> 0.0,
minLon -> 0.0,
}