跳转至

Get lat/long bounding box struct(获取纬度/经度边界框结构体)

Supported in: Batch, Faster, Streaming

Given a valid geometry or array of geometries, return a struct containing the bounds of the geometry or geometries.

Expression categories: Geospatial

Declared arguments

  • Expression: GeoJSON string or array of GeoJSON strings.
    Expression\ | Geometry>

Output type: LatLonBoundingBox

Examples

Example 1: Base case

Argument values:

  • Expression: geometry
geometry Output
{"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0],[0.0,1.0]]]} {
 maxLat -> 1.0,
 maxLon -> 1.0,
 minLat -> 0.0,
 minLon -> 0.0,
}

Example 2: Base case

Argument values:

  • Expression: geometryArray
geometryArray Output
[ {"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,
}

Example 3: Null case

Argument values:

  • Expression: geometryArray
geometryArray Output
null null

Example 4: Edge case

Argument values:

  • Expression: geometryArray
geometryArray Output
[ Invalid GeoJSON, {"type":"LineString","coordinates":[[2,0],[0,4.8]]} ] {
 maxLat -> 4.8,
 maxLon -> 2.0,
 minLat -> 0.0,
 minLon -> 0.0,
}


中文翻译

获取纬度/经度边界框结构体

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

给定一个有效的几何体(Geometry)或几何体数组,返回一个包含该几何体或几何体数组边界范围的结构体。

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

声明参数

  • 表达式: GeoJSON字符串或GeoJSON字符串数组。
    表达式\ | Geometry>

输出类型: LatLonBoundingBox

示例

示例1:基础情况

参数值:

  • 表达式: geometry
geometry 输出
{"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0],[0.0,1.0]]]} {
 maxLat -> 1.0,
 maxLon -> 1.0,
 minLat -> 0.0,
 minLon -> 0.0,
}

示例2:基础情况

参数值:

  • 表达式: geometryArray
geometryArray 输出
[ {"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,
}

示例3:空值情况

参数值:

  • 表达式: geometryArray
geometryArray 输出
null null

示例4:边界情况

参数值:

  • 表达式: geometryArray
geometryArray 输出
[ 无效的GeoJSON(Invalid GeoJSON), {"type":"LineString","coordinates":[[2,0],[0,4.8]]} ] {
 maxLat -> 4.8,
 maxLon -> 2.0,
 minLat -> 0.0,
 minLon -> 0.0,
}