跳转至
🎉 Apache Sedona 1.9.1 已正式发布!🗺️ 新增 Geography SQL 函数、Box2D 与 Box3D 类型、栅格 Python UDF 等。查看发布说明 →

ST_IsCollection

Introduction: Returns TRUE if the geometry type of the input is a geometry collection type. Collection types are the following:

  • GEOMETRYCOLLECTION
  • MULTI{POINT, POLYGON, LINESTRING}

ST_IsCollection

Format: ST_IsCollection(geom: Geometry)

Return type: Boolean

Since: v1.5.0

Example:

SELECT ST_IsCollection(ST_GeomFromText('MULTIPOINT(0 0), (6 6)'))

Output:

true

Example:

SELECT ST_IsCollection(ST_GeomFromText('POINT(5 5)'))

Output:

false