Get geometry envelope(获取几何包络线)¶
Supported in: Batch, Streaming
Given a valid geometry or array of geometries, return a geometry representing the envelope of the input. The envelope is the smallest axis-aligned rectangular region containing the minimum and maximum x and y values of the geometry.
Expression categories: Geospatial
Declared arguments¶
- Expression: GeoJSON string or array of GeoJSON strings.
Expression\| Geometry>
Output type: Geometry
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]]]} | {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,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]]]} ] | {"type":"Polygon","coordinates":[[[-6.0,-92.3],[-6.0,8.4],[125.6,8.4],[125.6,-92.3],[-6.0,-92.3]]]} |
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]]} ] | {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,4.8],[2.0,4.8],[2.0,0.0],[0.0,0.0]]]} |
中文翻译¶
获取几何包络线¶
支持:批处理(Batch)、流处理(Streaming)
给定一个有效的几何体(Geometry)或几何体数组,返回表示输入几何体包络线的几何体。包络线是包含几何体最小和最大x、y值的最小轴对齐矩形区域。
表达式类别: 地理空间(Geospatial)
声明的参数¶
- 表达式(Expression): GeoJSON字符串或GeoJSON字符串数组。
表达式\<数组\<几何体> | 几何体>
输出类型: 几何体(Geometry)
示例¶
示例1:基础情况¶
参数值:
- 表达式:
geometry
| geometry | 输出 |
|---|---|
| {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0],[0.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]]]} |
示例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]]]} ] | {"type":"Polygon","coordinates":[[[-6.0,-92.3],[-6.0,8.4],[125.6,8.4],[125.6,-92.3],[-6.0,-92.3]]]} |
示例3:空值情况¶
参数值:
- 表达式:
geometryArray
| geometryArray | 输出 |
|---|---|
| null | null |
示例4:边界情况¶
参数值:
- 表达式:
geometryArray
| geometryArray | 输出 |
|---|---|
| [ 无效的GeoJSON(Invalid GeoJSON), {"type":"LineString","coordinates":[[2,0],[0,4.8]]} ] | {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,4.8],[2.0,4.8],[2.0,0.0],[0.0,0.0]]]} |