跳转至

Filter by geometry type(按几何类型过滤)

Supported in: Batch, Faster, Streaming

Nulls any values in the geometry column that are not of the provided geometry types.

Expression categories: Geospatial

Declared arguments

  • Expression: The geometry column to filter.
    Expression\
  • Geometry types: The set of geometry types to keep.
    Set\>

Output type: Geometry

Examples

Example 1: Base case

Argument values:

  • Expression: geometry
  • Geometry types: {POINT}
geometry Output
{"type":"Point","coordinates": [32.0, 58.0]} {"type":"Point","coordinates": [32.0, 58.0]}

Example 2: Base case

Argument values:

  • Expression: geometry
  • Geometry types: {POINT}
geometry Output
{"type":"LineString","coordinates":[[-112.94377956164206,34.81725414459382],[-112.94377956164206,30.006795384733323]]} null

Example 3: Base case

Argument values:

  • Expression: geometry
  • Geometry types: {LINESTRING}
geometry Output
{"type":"LineString","coordinates":[[-112.94377956164206,34.81725414459382],[-112.94377956164206,30.006795384733323]]} {"type":"LineString","coordinates":[[-112.94377956164206,34.81725414459382],[-112.94377956164206,30.006795384733323]]}
{"type": "GeometryCollection","geometries": [{"type":"LineString","coordinates":[[-77.07368071728229... null

Example 4: Base case

Argument values:

  • Expression: geometry
  • Geometry types: {LINESTRING, POINT}
geometry Output
{"type":"LineString","coordinates":[[-112.94377956164206,34.81725414459382],[-112.94377956164206,30.006795384733323]]} {"type":"LineString","coordinates":[[-112.94377956164206,34.81725414459382],[-112.94377956164206,30.006795384733323]]}
{"type":"Point","coordinates": [32.0, 58.0]} {"type":"Point","coordinates": [32.0, 58.0]}

Example 5: Null case

Argument values:

  • Expression: geometry
  • Geometry types: {POINT}
geometry Output
null null


中文翻译


按几何类型过滤

支持:批量处理、快速处理、流处理

将几何列中不属于指定几何类型的值设为空值。

表达式类别: 地理空间

声明的参数

  • 表达式(Expression): 要过滤的几何列。
    表达式\
  • 几何类型(Geometry types): 要保留的几何类型集合。
    集合\<枚举\>

输出类型: Geometry

示例

示例 1:基本情况

参数值:

  • 表达式: geometry
  • 几何类型: {POINT}
geometry 输出
{"type":"Point","coordinates": [32.0, 58.0]} {"type":"Point","coordinates": [32.0, 58.0]}

示例 2:基本情况

参数值:

  • 表达式: geometry
  • 几何类型: {POINT}
geometry 输出
{"type":"LineString","coordinates":[[-112.94377956164206,34.81725414459382],[-112.94377956164206,30.006795384733323]]} null

示例 3:基本情况

参数值:

  • 表达式: geometry
  • 几何类型: {LINESTRING}
geometry 输出
{"type":"LineString","coordinates":[[-112.94377956164206,34.81725414459382],[-112.94377956164206,30.006795384733323]]} {"type":"LineString","coordinates":[[-112.94377956164206,34.81725414459382],[-112.94377956164206,30.006795384733323]]}
{"type": "GeometryCollection","geometries": [{"type":"LineString","coordinates":[[-77.07368071728229... null

示例 4:基本情况

参数值:

  • 表达式: geometry
  • 几何类型: {LINESTRING, POINT}
geometry 输出
{"type":"LineString","coordinates":[[-112.94377956164206,34.81725414459382],[-112.94377956164206,30.006795384733323]]} {"type":"LineString","coordinates":[[-112.94377956164206,34.81725414459382],[-112.94377956164206,30.006795384733323]]}
{"type":"Point","coordinates": [32.0, 58.0]} {"type":"Point","coordinates": [32.0, 58.0]}

示例 5:空值情况

参数值:

  • 表达式: geometry
  • 几何类型: {POINT}
geometry 输出
null null