ST_Collect()¶
将两个几何对象组合为多几何对象或几何集合。
语法¶
ST_Collect(geom1, geom2)
参数说明¶
参数 |
说明 |
|---|---|
|
第一个 GEOMETRY 或 GEOMETRY32 值。 |
|
来自同一几何类型族的第二个值。 |
返回值¶
返回输入几何类型族中的几何值。
使用说明¶
示例¶
DROP DATABASE IF EXISTS geo_operation_demo;
CREATE DATABASE geo_operation_demo;
USE geo_operation_demo;
SELECT ST_AsText(ST_Collect(ST_GeomFromText('POINT(0 0)'), ST_GeomFromText('POINT(1 1)'))) AS collected;
DROP DATABASE geo_operation_demo;