注意:以下翻译的准确性尚未经过验证。这是使用 AIP ↗ 从原始英文文本进行的机器翻译。
支持于: 批处理
给定一列GeoPoints和一个排序,通过按指定顺序连接GeoPoints返回一个多边形或线字符串。此函数假定数据是表格形式的,每行表示线字符串或多边形外壳中的一个单独的GeoPoint,以及指定这些点顺序的一列。对于多边形,此排序应识别当您逆时针移动外壳时的点。给定这些点的排序和分区(分组),该函数通过按order-by列的升序连接GeoPoints来构造该分区所需的几何图形。
表达式类别: 地理空间
输出类型: 几何图形
参数值:
geo_pointorderLINE_STRING给定输入表:
| geo_point | order |
|---|---|
| { latitude -> 0.0, longitude -> 0.0, } | 0 |
| { latitude -> 1.0, longitude -> 0.0, } | 1 |
| { latitude -> 1.0, longitude -> 1.0, } | 2 |
输出: {"type":"LineString","coordinates": [[0.0,0.0],[0.0, 1.0],[1.0,1.0]]}
参数值:
geo_pointorderPOLYGON给定输入表:
| geo_point | order |
|---|---|
| { latitude -> 0.0, longitude -> 0.0, } | 0 |
| { latitude -> 1.0, longitude -> 0.0, } | 3 |
| { latitude -> 1.0, longitude -> 1.0, } | 2 |
| { latitude -> 0.0, longitude -> 0.0, } | 4 |
| { latitude -> 0.0, longitude -> 1.0, } | 1 |
输出: {"type":"Polygon","coordinates": [[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]]]}
参数值:
geo_pointorderLINE_STRING给定输入表:
| geo_point | order |
|---|---|
| { latitude -> 0.0, longitude -> 0.0, } | 0.0 |
| null | 1.0 |
| null | 2.0 |
| { latitude -> 0.0, longitude -> 1.0, } | 2.0 |
输出: {"type":"LineString","coordinates": [[0.0,0.0],[1.0, 0.0]]}
参数值:
geo_pointorderLINE_STRING给定输入表:
| geo_point | order |
|---|---|
| { latitude -> 0.0, longitude -> 0.0, } | 0.0 |
输出: null
参数值:
geo_pointorderPOLYGON给定输入表:
| geo_point | order |
|---|---|
| { latitude -> 0.0, longitude -> 0.0, } | 0 |
| { latitude -> 1.0, longitude -> 1.0, } | 2 |
| { latitude -> 1.0, longitude -> 0.0, } | 3 |
| { latitude -> 0.0, longitude -> 1.0, } | 1 |
输出: {"type":"Polygon","coordinates": [[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]]]}
参数值:
geo_pointorderPOLYGON给定输入表:
| geo_point | order |
|---|---|
| { latitude -> 0.0, longitude -> 0.0, } | 0 |
| { latitude -> 1.0, longitude -> 0.0, } | 1 |
输出: null
参数值:
geo_pointorderPOLYGON给定输入表:
| geo_point | order |
|---|---|
| null | 0 |
输出: null
参数值:
geo_pointorderLINE_STRING给定输入表:
| geo_point | order |
|---|---|
| { latitude -> 0.0, longitude -> 0.0, } | 0 |
| { latitude -> 1.0, longitude -> 1.0, } | null |
| { latitude -> 1.0, longitude -> 0.0, } | 1 |
输出: {"type":"LineString","coordinates": [[0.0,0.0],[0.0, 1.0]]}