跳转至

Parse well known text as geometry(将 Well-Known Text 解析为几何图形)

Supported in: Batch, Faster, Streaming

Converts well-known text (WKT) string to geometry logical type. Invalid WKT input will be returned as null. Optionally supply a source coordinate system identifier to convert from the source coordinate system to WGS 84 if the WKT is not in WGS 84 already.

Expression categories: Geospatial

Declared arguments

  • Expression: Valid well-known text as a string.
    Expression\
  • optional Source coordinate system: Optional coordinate system identifier if the well-known text is not WGS 84. Formatted as "authority:id". For example, UTM zone 18N could be identified by EPSG:32618.
    Literal\

Output type: Geometry

Examples

Example 1: Base case

Argument values:

  • Expression: wkt
  • Source coordinate system: null
wkt Output
POINT (3.0 5.0 2.0) {"type":"Point","coordinates":[3.0, 5.0, 2.0]}
POLYGON ((0.0 0.0, 1.0 0.0, 0.0 1.0, 0.0 0.0)) {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0],[0.0,1.0],[0.0,0.0]]]}
LINESTRING (0.0 0.0, 1.0 0.0) {"type":"LineString","coordinates":[[0.0,0.0],[1.0,0.0]]}

Example 2: Base case

Argument values:

  • Expression: wkt
  • Source coordinate system: EPSG:32618
wkt Output
POINT (320000.0 4300000.0 2.0) {"type":"Point","coordinates":[-77.07368071728229,38.83040844313318, 2.0]}
POLYGON ((320000.0 4300000.0, 320100.0 4300000.0, 320000.0 4300100.0, 320000.0 4300000.0)) {"type":"Polygon","coordinates":[[[-77.07368071728229,38.83040844313318],[-77.0725293738795,38.83042888342659],[-77.07370685720375,38.83130901341597],[-77.07368071728229,38.83040844313318]]]}
LINESTRING (320000.0 4300000.0, 320100.0 4300000.0) {"type":"LineString","coordinates":[[-77.07368071728229,38.83040844313318],[-77.0725293738795,38.83042888342659]]}


中文翻译

将 Well-Known Text 解析为几何图形

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

将 Well-Known Text (WKT) 字符串转换为几何逻辑类型。无效的 WKT 输入将返回 null。如果 WKT 并非 WGS 84 格式,可选择提供源坐标系标识符,将其从源坐标系转换为 WGS 84。

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

声明的参数

  • 表达式: 有效的 Well-Known Text 字符串。
    Expression\
  • 可选 源坐标系: 如果 Well-Known Text 不是 WGS 84 格式,可选的坐标系标识符。格式为 "authority:id"。例如,UTM 18N 区可由 EPSG:32618 标识。
    Literal\

输出类型: Geometry

示例

示例 1:基本情况

参数值:

  • 表达式: wkt
  • 源坐标系: null
wkt 输出
POINT (3.0 5.0 2.0) {"type":"Point","coordinates":[3.0, 5.0, 2.0]}
POLYGON ((0.0 0.0, 1.0 0.0, 0.0 1.0, 0.0 0.0)) {"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0],[0.0,1.0],[0.0,0.0]]]}
LINESTRING (0.0 0.0, 1.0 0.0) {"type":"LineString","coordinates":[[0.0,0.0],[1.0,0.0]]}

示例 2:基本情况

参数值:

  • 表达式: wkt
  • 源坐标系: EPSG:32618
wkt 输出
POINT (320000.0 4300000.0 2.0) {"type":"Point","coordinates":[-77.07368071728229,38.83040844313318, 2.0]}
POLYGON ((320000.0 4300000.0, 320100.0 4300000.0, 320000.0 4300100.0, 320000.0 4300000.0)) {"type":"Polygon","coordinates":[[[-77.07368071728229,38.83040844313318],[-77.0725293738795,38.83042888342659],[-77.07370685720375,38.83130901341597],[-77.07368071728229,38.83040844313318]]]}
LINESTRING (320000.0 4300000.0, 320100.0 4300000.0) {"type":"LineString","coordinates":[[-77.07368071728229,38.83040844313318],[-77.0725293738795,38.83042888342659]]}