跳转至

Geometry explode to array(几何体拆解为数组(Geometry explode to array))

Supported in: Batch, Faster, Streaming

Converts a geometry to an array of its constituent simple geometries.

Expression categories: Geospatial

Declared arguments

  • Expression: The geometry to explode.
    Expression\

Output type: Array\

Examples

Example 1: Base case

Argument values:

  • Expression: geometry
geometry Output
{"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]]} [ {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]]} ]
{"type":"MultiPolygon","coordinates":[[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]],[[[5.0,5.0],[5.0,6.0],[6.0,6.0],[6.0,5.0],[5.0,5.0]]]]} [ {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]]}, {"type":"Polygon","coordinates":[[[5.0,5.0],[5.0,6.0],[6.0,6.0],[6.0,5.0],[5.0,5.0]]]} ]

Example 2: Base case

Argument values:

  • Expression: geometry
geometry Output
{"type": "GeometryCollection", "geometries": [{"type": "MultiPoint", "coordinates": [[0, 0], [1, 1]]}, {"type": "Polygon", "coordinates": [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]]}]} [ {"type":"Point","coordinates":[0.0,0.0]}, {"type":"Point","coordinates":[1.0,1.0]}, {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]]} ]

Example 3: Null case

Argument values:

  • Expression: geometry
geometry Output
null null


中文翻译


几何体拆解为数组(Geometry explode to array)

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

将几何体(geometry)转换为其组成简单几何体(simple geometries)的数组。

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

声明的参数

  • 表达式(Expression): 要拆解的几何体。
    表达式\

输出类型: 数组\

示例

示例 1:基础情况

参数值:

  • 表达式: geometry
geometry 输出
{"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]]} [ {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]]} ]
{"type":"MultiPolygon","coordinates":[[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]],[[[5.0,5.0],[5.0,6.0],[6.0,6.0],[6.0,5.0],[5.0,5.0]]]]} [ {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]]}, {"type":"Polygon","coordinates":[[[5.0,5.0],[5.0,6.0],[6.0,6.0],[6.0,5.0],[5.0,5.0]]]} ]

示例 2:基础情况

参数值:

  • 表达式: geometry
geometry 输出
{"type": "GeometryCollection", "geometries": [{"type": "MultiPoint", "coordinates": [[0, 0], [1, 1]]}, {"type": "Polygon", "coordinates": [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]]}]} [ {"type":"Point","coordinates":[0.0,0.0]}, {"type":"Point","coordinates":[1.0,1.0]}, {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]]} ]

示例 3:空值情况

参数值:

  • 表达式: geometry
geometry 输出
null null