Prepare geometry(准备几何图形)¶
Supported in: Batch, Streaming
Prepares a geometry for downstream use, for example indexing to the ontology, by converting a geometry string into valid GeoJSON. Polygons will be closed and deduplicated. Geometries which cross the anti-meridian (as indicated by width > 180 degrees) will be split into multiple features on each side of the anti-meridian. By default, this operation will return the converted geometry, or null if the string cannot be converted. Alternatively, in the "show errors" output mode, this operation will instead output a struct containing either the successfully parsed output or a descriptive error message.
Expression categories: Geospatial
Declared arguments¶
- Geometry string: Geometry string to be parsed and converted to GeoJSON.
Expression\ - optional Output mode: Choose to output as a simple output where the output is the resulting geometry and errors are returned as null, or output a struct with two fields: an "ok" field with the resulting geometry if it can be converted; otherwise, an "error" field containing a descriptive error message.
Enum\
Output type: Geometry | Struct\
Examples¶
Example 1: Base case¶
Argument values:
- Geometry string:
geometry - Output mode: null
| geometry | Output |
|---|---|
| {"type":"Polygon","coordinates":[[[0.0,0.0],[10.0,0.0],[10.0,10.0],[0.0,10.0],[0.0,0.0]]]} | {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,10.0],[10.0,10.0],[10.0,0.0],[0.0,0.0]]]} |
| {"type":"Polygon","coordinates":[[[0.0,0.0,1.0],[1.0,0.0,1.0],[0.0,1.0,1.0],[0.0,0.0,1.0]]]} | {"type":"Polygon","coordinates":[[[0.0,0.0,1.0],[0.0,1.0,1.0],[1.0,0.0,1.0],[0.0,0.0,1.0]]]} |
| {"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,0.0],[0.0,0.0]]]} |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0], [1.0,0.0], [0.0,1.0], [0.0,0.0]]]} | {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,0.0],[0.0,0.0]]]} |
| {"type":"Polygon","coordinates":[[[179.0,-30.0],[-179.0,-30.0],[-179.0,30.0],[179.0,30.0],[179.0,-30]]]} | {"type":"MultiPolygon","coordinates":[[[[-180.0,-30.0],[-180.0,30.0],[-179.0,30.0],[-179.0,-30.0],[-180.0,-30.0]]],[[[180.0,30.0],[180.0,-30.0],[179.0,-30.0],[179.0,30.0],[180.0,30.0]]]]} |
| {"type":"LineString","coordinates":[[179.0,30.0],[-179.0,30.0]]} | {"type":"MultiLineString","coordinates":[[[179.0,30.0],[180.0,30.0]],[[-180.0,30.0],[-179.0,30.0]]]} |
| {"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[40.0,10.0],[0.0,1.0]... | {"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[40.0,10.0],[0.0,1.0]... |
| {"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[1.0,0.0]},{"type":"LineString","coordinates":[[179.0,30.0],[-179.0,30.0]]}]} | {"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[1.0,0.0]},{"type":"MultiLineString","coordinates":[[[179.0,30.0],[180.0,30.0]],[[-180.0,30.0],[-179.0,30.0]]]}]} |
| {"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[0.0,0.0],[1.0,0.0]]}... | {"type":"MultiLineString","coordinates":[[[0.0,0.0],[1.0,0.0]],[[1.0,1.0],[2.0,1.0]]]} |
| {"type":"GeometryCollection","geometries":[{"type":"MultiLineString","coordinates":[[[0.0,0.0],[1.0,0.0]],[],[[1.0,1.0],[2.0,1.0]]]},{"type":"MultiPoint","coordinates":[[0.0,0.0],[1.0,1.0]]}]} | {"geometries":[{"coordinates":[[[0.0,0.0],[1.0,0.0]],[[1.0,1.0],[2.0,1.0]]],"type":"MultiLineString"},{"coordinates":[[0.0,0.0],[1.0,1.0]],"type":"MultiPoint"}],"type":"GeometryCollection"} |
| {"type":"MultiPolygon","coordinates":[[[[1.0,1.0],[2.0,1.0],[2.0,2.0],[1.0,2.0],[1.0,1.0]]],[[]],[[[10.0,10.0],[20.0,10.0],[20.0,20.0],[10.0,20.0],[10.0,10.0]]]]} | {"type":"MultiPolygon","coordinates":[[[[1.0,2.0],[2.0,2.0],[2.0,1.0],[1.0,1.0],[1.0,2.0]]],[[[10.0,20.0],[20.0,20.0],[20.0,10.0],[10.0,10.0],[10.0,20.0]]]]} |
Example 2: Base case¶
Argument values:
- Geometry string:
geometry - Output mode: null
| geometry | Output |
|---|---|
| {"type":"MultiPolygon","coordinates":[[[[102.0,2.0],[102.0,3.0],[103.0,3.0],[103.0,2.0],[102.0,2.0]]]]} | {"type":"Polygon","coordinates":[[[102.0,2.0],[102.0,3.0],[103.0,3.0],[103.0,2.0],[102.0,2.0]]]} |
| {"type":"MultiPolygon","coordinates":[[[]],[[[102.0,2.0],[103.0,2.0],[103.0,3.0],[102.0,3.0],[102.0,2.0]]]]} | {"type":"Polygon","coordinates":[[[102.0,2.0],[102.0,3.0],[103.0,3.0],[103.0,2.0],[102.0,2.0]]]} |
| {"type":"FeatureCollection","features":[{"geometry":{"type":"MultiPolygon","coordinates":[[[[0.0,0.0],[0.0,1.0],[1.0,0.0],[0.0,0.0]]]]},"properties":{"gaccname":"namehere"},"type":"Feature"}]} | {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,0.0],[0.0,0.0]]]} |
| {"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[40.0,11.0],[0.0,1.0]]},{"type":"LineString","coordinates":[[10.0,10.0],[20.0,20.0],[10.0,40.0]]}]} | {"type":"MultiLineString","coordinates":[[[40.0,11.0],[0.0,1.0]],[[10.0,10.0],[20.0,20.0],[10.0,40.0]]]} |
Example 3: Base case¶
Argument values:
- Geometry string:
geometry - Output mode: null
| geometry | Output |
|---|---|
| {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,1.0],[0.0,1.0], [1.0,0.0], [0.0,0.0]]]} | {"type":"MultiPolygon","coordinates":[[[[0.0,0.0],[0.5,0.5],[1.0,0.0],[0.0,0.0]]],[[[0.5,0.5],[0.0,1.0],[1.0,1.0],[0.5,0.5]]]]} |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[2.0,0.0],[1.0,1.0],[2.0,2.0],[0.0,2.0],[1.0,1.0],[0.0,0.0]]]} | {"type":"MultiPolygon","coordinates":[[[[0.0,0.0],[1.0,1.0],[2.0,0.0],[0.0,0.0]]],[[[1.0,1.0],[0.0,2.0],[2.0,2.0],[1.0,1.0]]]]} |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[2.0,0.0],[2.0,2.0],[0.0,2.0],[0.0,0.0]],[[0.0,0.0],[2.0,0.0],[1.0,1.0],[0.0,0.0]]]} | {"type":"Polygon","coordinates":[[[0.0,2.0],[2.0,2.0],[2.0,0.0],[1.0,1.0],[0.0,0.0],[0.0,2.0]]]} |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]],[[3.0,3.0],[4.0,3.0],[4.0,4.0],[3.0,4.0],[3.0,3.0]]]} | {"type":"MultiPolygon","coordinates":[[[[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0],[0.0,1.0]]],[[[3.0,4.0],[4.0,4.0],[4.0,3.0],[3.0,3.0],[3.0,4.0]]]]} |
Example 4: Null case¶
Argument values:
- Geometry string:
geometry - Output mode:
with_errors
| geometry | Output |
|---|---|
| null | { error: Input is null, ok: null, } |
| Not geojson | { error: Input string could not be parsed as GeoJSON, ok: null, } |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0,1.0],[0.0,1.0],[0.0,0.0]]]} | { error: Coordinate dimension is mixed, ok: null, } |
| {"type":"LineString","coordinates":[[0.0,0.0]]} | { error: Invalid number of points in LineString (found 1 - must be 0 or >= 2), ok: null, } |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,91.0],[0.0,1.0],[0.0,0.0]]]} | { error: Coordinates out-of-bounds. Latitudes must fall in [-90, 90] and longitudes in [-180, 180], ok: null, } |
| {"type":"Polygon","coordinates":[[[0.0,-90.1],[1.0,0.0],[0.0,1.0],[0.0,0.0]]]} | { error: Coordinates out-of-bounds. Latitudes must fall in [-90, 90] and longitudes in [-180, 180], ok: null, } |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[181.0,89.0],[0.0,1.0],[0.0,0.0]]]} | { error: Coordinates out-of-bounds. Latitudes must fall in [-90, 90] and longitudes in [-180, 180], ok: null, } |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[-182.0,89.0],[0.0,1.0],[0.0,0.0]]]} | { error: Coordinates out-of-bounds. Latitudes must fall in [-90, 90] and longitudes in [-180, 180], ok: null, } |
| {"type":"Polygon","coordinates":[]} | { error: Expected polygon to contain at least one ring, ok: null, } |
Example 5: Null case¶
Argument values:
- Geometry string:
geometry - Output mode: null
| geometry | Output |
|---|---|
| {"type":"Polygon","coordinates":[[]]} | null |
Example 6: Edge case¶
Argument values:
- Geometry string:
geometry - Output mode: null
| geometry | Output |
|---|---|
| {"coordinates": [[[-191.9065788394177,5.453742403668187],[-191.9065788394177,-11.163604962907428],[-... | {"type":"MultiPolygon","coordinates":[[[[-180.0,-11.163604962907428],[-180.0,5.453742403668187],[-15... |
Example 7: Edge case¶
Argument values:
- Geometry string:
geometry - Output mode: null
| geometry | Output |
|---|---|
| {"type":"LineString","coordinates":[[1.0, 1.0], [1.0, 1.0], [1.0, 1.0]]} | {"type":"Point","coordinates":[1.0,1.0]} |
Example 8: Edge case¶
Argument values:
- Geometry string:
geometry - Output mode: null
| geometry | Output |
|---|---|
| {"type":"MultiPolygon","coordinates":[[[[0.0,0.0],[1.0,0.0],[0.0,0.0]]],[[[102.0,2.0],[103.0,2.0],[103.0,3.0],[102.0,3.0],[102.0,2.0]]]]} | {"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[0.0,0.0],[1.0,0.0]]},{"type":"Polygon","coordinates":[[[102.0,2.0],[102.0,3.0],[103.0,3.0],[103.0,2.0],[102.0,2.0]]]}]} |
Example 9: Edge case¶
Argument values:
- Geometry string:
geometry - Output mode: null
| geometry | Output |
|---|---|
| {"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[-122.4000,37.8000]}]}]}]} | {"coordinates":[-122.4, 37.8], "type":"Point"} |
| {"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"Geome... | {"coordinates":[-122.4, 37.8], "type":"Point"} |
Example 10: Edge case¶
Argument values:
- Geometry string:
geometry - Output mode:
with_errors
| geometry | Output |
|---|---|
| {"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[-122.4000,37.8000]}]}]}]} | { error: null, ok: {"type":"Point","coordinates":[-122.4,37.8]}, } |
| {"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"Geome... | { error: null, ok: {"type":"Point","coordinates":[-122.4,37.8]}, } |
| {"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"Multi... | { error: null, ok: {"type":"MultiLineString","coordinates":[[[-122.36,37... |
| {"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"MultiPoint","coordinates":[[-122.4100,37.8100],[-122.4200,37.8200],[-122.4300,37.8300]]}]}]} | { error: null, ok: {"type":"MultiPoint","coordinates":[[-122.41,37.81],[-122.42,37.82],[-122.43,37.83]]}, } |
中文翻译¶
准备几何图形¶
支持:批处理(Batch)、流处理(Streaming)
通过将几何图形字符串转换为有效的 GeoJSON,为下游使用(例如索引到本体)准备几何图形。多边形将被闭合并去重。跨越反子午线(以宽度 > 180 度表示)的几何图形将被分割为反子午线两侧的多个要素。默认情况下,此操作将返回转换后的几何图形,如果字符串无法转换则返回 null。或者,在"显示错误"输出模式下,此操作将输出一个结构体,其中包含成功解析的输出或描述性错误消息。
表达式类别: 地理空间(Geospatial)
声明的参数¶
- 几何图形字符串(Geometry string): 要解析并转换为 GeoJSON 的几何图形字符串。
表达式\ - 可选 输出模式(Output mode): 选择输出为简单输出(输出结果为几何图形,错误返回 null),或输出包含两个字段的结构体:一个"ok"字段包含可转换的结果几何图形;否则,一个"error"字段包含描述性错误消息。
枚举\
输出类型: Geometry | Struct\
示例¶
示例 1:基本情况¶
参数值:
- 几何图形字符串:
geometry - 输出模式: null
| geometry | 输出 |
|---|---|
| {"type":"Polygon","coordinates":[[[0.0,0.0],[10.0,0.0],[10.0,10.0],[0.0,10.0],[0.0,0.0]]]} | {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,10.0],[10.0,10.0],[10.0,0.0],[0.0,0.0]]]} |
| {"type":"Polygon","coordinates":[[[0.0,0.0,1.0],[1.0,0.0,1.0],[0.0,1.0,1.0],[0.0,0.0,1.0]]]} | {"type":"Polygon","coordinates":[[[0.0,0.0,1.0],[0.0,1.0,1.0],[1.0,0.0,1.0],[0.0,0.0,1.0]]]} |
| {"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,0.0],[0.0,0.0]]]} |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0], [1.0,0.0], [0.0,1.0], [0.0,0.0]]]} | {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,0.0],[0.0,0.0]]]} |
| {"type":"Polygon","coordinates":[[[179.0,-30.0],[-179.0,-30.0],[-179.0,30.0],[179.0,30.0],[179.0,-30]]]} | {"type":"MultiPolygon","coordinates":[[[[-180.0,-30.0],[-180.0,30.0],[-179.0,30.0],[-179.0,-30.0],[-180.0,-30.0]]],[[[180.0,30.0],[180.0,-30.0],[179.0,-30.0],[179.0,30.0],[180.0,30.0]]]]} |
| {"type":"LineString","coordinates":[[179.0,30.0],[-179.0,30.0]]} | {"type":"MultiLineString","coordinates":[[[179.0,30.0],[180.0,30.0]],[[-180.0,30.0],[-179.0,30.0]]]} |
| {"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[40.0,10.0],[0.0,1.0]... | {"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[40.0,10.0],[0.0,1.0]... |
| {"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[1.0,0.0]},{"type":"LineString","coordinates":[[179.0,30.0],[-179.0,30.0]]}]} | {"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[1.0,0.0]},{"type":"MultiLineString","coordinates":[[[179.0,30.0],[180.0,30.0]],[[-180.0,30.0],[-179.0,30.0]]]}]} |
| {"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[0.0,0.0],[1.0,0.0]]}... | {"type":"MultiLineString","coordinates":[[[0.0,0.0],[1.0,0.0]],[[1.0,1.0],[2.0,1.0]]]} |
| {"type":"GeometryCollection","geometries":[{"type":"MultiLineString","coordinates":[[[0.0,0.0],[1.0,0.0]],[],[[1.0,1.0],[2.0,1.0]]]},{"type":"MultiPoint","coordinates":[[0.0,0.0],[1.0,1.0]]}]} | {"geometries":[{"coordinates":[[[0.0,0.0],[1.0,0.0]],[[1.0,1.0],[2.0,1.0]]],"type":"MultiLineString"},{"coordinates":[[0.0,0.0],[1.0,1.0]],"type":"MultiPoint"}],"type":"GeometryCollection"} |
| {"type":"MultiPolygon","coordinates":[[[[1.0,1.0],[2.0,1.0],[2.0,2.0],[1.0,2.0],[1.0,1.0]]],[[]],[[[10.0,10.0],[20.0,10.0],[20.0,20.0],[10.0,20.0],[10.0,10.0]]]]} | {"type":"MultiPolygon","coordinates":[[[[1.0,2.0],[2.0,2.0],[2.0,1.0],[1.0,1.0],[1.0,2.0]]],[[[10.0,20.0],[20.0,20.0],[20.0,10.0],[10.0,10.0],[10.0,20.0]]]]} |
示例 2:基本情况¶
参数值:
- 几何图形字符串:
geometry - 输出模式: null
| geometry | 输出 |
|---|---|
| {"type":"MultiPolygon","coordinates":[[[[102.0,2.0],[102.0,3.0],[103.0,3.0],[103.0,2.0],[102.0,2.0]]]]} | {"type":"Polygon","coordinates":[[[102.0,2.0],[102.0,3.0],[103.0,3.0],[103.0,2.0],[102.0,2.0]]]} |
| {"type":"MultiPolygon","coordinates":[[[]],[[[102.0,2.0],[103.0,2.0],[103.0,3.0],[102.0,3.0],[102.0,2.0]]]]} | {"type":"Polygon","coordinates":[[[102.0,2.0],[102.0,3.0],[103.0,3.0],[103.0,2.0],[102.0,2.0]]]} |
| {"type":"FeatureCollection","features":[{"geometry":{"type":"MultiPolygon","coordinates":[[[[0.0,0.0],[0.0,1.0],[1.0,0.0],[0.0,0.0]]]]},"properties":{"gaccname":"namehere"},"type":"Feature"}]} | {"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,0.0],[0.0,0.0]]]} |
| {"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[40.0,11.0],[0.0,1.0]]},{"type":"LineString","coordinates":[[10.0,10.0],[20.0,20.0],[10.0,40.0]]}]} | {"type":"MultiLineString","coordinates":[[[40.0,11.0],[0.0,1.0]],[[10.0,10.0],[20.0,20.0],[10.0,40.0]]]} |
示例 3:基本情况¶
参数值:
- 几何图形字符串:
geometry - 输出模式: null
| geometry | 输出 |
|---|---|
| {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,1.0],[0.0,1.0], [1.0,0.0], [0.0,0.0]]]} | {"type":"MultiPolygon","coordinates":[[[[0.0,0.0],[0.5,0.5],[1.0,0.0],[0.0,0.0]]],[[[0.5,0.5],[0.0,1.0],[1.0,1.0],[0.5,0.5]]]]} |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[2.0,0.0],[1.0,1.0],[2.0,2.0],[0.0,2.0],[1.0,1.0],[0.0,0.0]]]} | {"type":"MultiPolygon","coordinates":[[[[0.0,0.0],[1.0,1.0],[2.0,0.0],[0.0,0.0]]],[[[1.0,1.0],[0.0,2.0],[2.0,2.0],[1.0,1.0]]]]} |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[2.0,0.0],[2.0,2.0],[0.0,2.0],[0.0,0.0]],[[0.0,0.0],[2.0,0.0],[1.0,1.0],[0.0,0.0]]]} | {"type":"Polygon","coordinates":[[[0.0,2.0],[2.0,2.0],[2.0,0.0],[1.0,1.0],[0.0,0.0],[0.0,2.0]]]} |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]],[[3.0,3.0],[4.0,3.0],[4.0,4.0],[3.0,4.0],[3.0,3.0]]]} | {"type":"MultiPolygon","coordinates":[[[[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0],[0.0,1.0]]],[[[3.0,4.0],[4.0,4.0],[4.0,3.0],[3.0,3.0],[3.0,4.0]]]]} |
示例 4:空值情况¶
参数值:
- 几何图形字符串:
geometry - 输出模式:
with_errors
| geometry | 输出 |
|---|---|
| null | { error: 输入为空, ok: null, } |
| 非 GeoJSON | { error: 输入字符串无法解析为 GeoJSON, ok: null, } |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0,1.0],[0.0,1.0],[0.0,0.0]]]} | { error: 坐标维度不一致, ok: null, } |
| {"type":"LineString","coordinates":[[0.0,0.0]]} | { error: LineString 中的点数无效(发现 1 个 - 必须为 0 或 >= 2), ok: null, } |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,91.0],[0.0,1.0],[0.0,0.0]]]} | { error: 坐标超出范围。纬度必须在 [-90, 90] 范围内,经度必须在 [-180, 180] 范围内, ok: null, } |
| {"type":"Polygon","coordinates":[[[0.0,-90.1],[1.0,0.0],[0.0,1.0],[0.0,0.0]]]} | { error: 坐标超出范围。纬度必须在 [-90, 90] 范围内,经度必须在 [-180, 180] 范围内, ok: null, } |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[181.0,89.0],[0.0,1.0],[0.0,0.0]]]} | { error: 坐标超出范围。纬度必须在 [-90, 90] 范围内,经度必须在 [-180, 180] 范围内, ok: null, } |
| {"type":"Polygon","coordinates":[[[0.0,0.0],[-182.0,89.0],[0.0,1.0],[0.0,0.0]]]} | { error: 坐标超出范围。纬度必须在 [-90, 90] 范围内,经度必须在 [-180, 180] 范围内, ok: null, } |
| {"type":"Polygon","coordinates":[]} | { error: 期望多边形至少包含一个环, ok: null, } |
示例 5:空值情况¶
参数值:
- 几何图形字符串:
geometry - 输出模式: null
| geometry | 输出 |
|---|---|
| {"type":"Polygon","coordinates":[[]]} | null |
示例 6:边界情况¶
参数值:
- 几何图形字符串:
geometry - 输出模式: null
| geometry | 输出 |
|---|---|
| {"coordinates": [[[-191.9065788394177,5.453742403668187],[-191.9065788394177,-11.163604962907428],[-... | {"type":"MultiPolygon","coordinates":[[[[-180.0,-11.163604962907428],[-180.0,5.453742403668187],[-15... |
示例 7:边界情况¶
参数值:
- 几何图形字符串:
geometry - 输出模式: null
| geometry | 输出 |
|---|---|
| {"type":"LineString","coordinates":[[1.0, 1.0], [1.0, 1.0], [1.0, 1.0]]} | {"type":"Point","coordinates":[1.0,1.0]} |
示例 8:边界情况¶
参数值:
- 几何图形字符串:
geometry - 输出模式: null
| geometry | 输出 |
|---|---|
| {"type":"MultiPolygon","coordinates":[[[[0.0,0.0],[1.0,0.0],[0.0,0.0]]],[[[102.0,2.0],[103.0,2.0],[103.0,3.0],[102.0,3.0],[102.0,2.0]]]]} | {"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[0.0,0.0],[1.0,0.0]]},{"type":"Polygon","coordinates":[[[102.0,2.0],[102.0,3.0],[103.0,3.0],[103.0,2.0],[102.0,2.0]]]}]} |
示例 9:边界情况¶
参数值:
- 几何图形字符串:
geometry - 输出模式: null
| geometry | 输出 |
|---|---|
| {"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[-122.4000,37.8000]}]}]}]} | {"coordinates":[-122.4, 37.8], "type":"Point"} |
| {"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"Geome... | {"coordinates":[-122.4, 37.8], "type":"Point"} |
示例 10:边界情况¶
参数值:
- 几何图形字符串:
geometry - 输出模式:
with_errors
| geometry | 输出 |
|---|---|
| {"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[-122.4000,37.8000]}]}]}]} | { error: null, ok: {"type":"Point","coordinates":[-122.4,37.8]}, } |
| {"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"Geome... | { error: null, ok: {"type":"Point","coordinates":[-122.4,37.8]}, } |
| {"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"Multi... | { error: null, ok: {"type":"MultiLineString","coordinates":[[[-122.36,37... |
| {"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[{"type":"MultiPoint","coordinates":[[-122.4100,37.8100],[-122.4200,37.8200],[-122.4300,37.8300]]}]}]} | { error: null, ok: {"type":"MultiPoint","coordinates":[[-122.41,37.81],[-122.42,37.82],[-122.43,37.83]]}, } |