ST_Aggr_ConvexHull
![注 注](rsrc/note.png)
仅适用于 Oracle 的 ST_Geometry
定义
ST_Aggr_ConvexHull 用于创建一个单个几何,以表示由所有输入几何的并集所形成的几何的凸包。实际上,ST_Aggr_ConvexHull 等效于 ST_ConvexHull(ST_Aggr_Union(geometries))。
语法
sde.st_aggr_convexhull (g1 sde.st_geometry)
返回类型
ST_Geometry
示例
本示例创建了一个 service_territories 表文件并执行 SELECT 语句以聚合所有几何,从而生成一个 ST_Geometry 几何,用于表示所有形状的并集的凸包。
CREATE TABLE service_territories
(ID integer, UNITS, number, SHAPE sde.st_geometry);
INSERT INTO service_territories (id, shape) VALUES (
1,
1250,
sde.st_polygon ('polygon ((20 30, 30 30, 30 40, 20 40, 20 30))', 0)
);
INSERT INTO service_territories (id, shape) VALUES (
2,
875,
sde.st_polygon ('polygon ((30 30, 30 50, 50 50, 50 30, 30 30))', 0)
);
INSERT INTO service_territories (id, shape) VALUES (
3,
1700,
sde.st_polygon ('polygon ((40 40, 40 60, 60 60, 60 40, 40 40))', 0)
);
SELECT sde.st_astext(sde.st_aggr_convexhull(shape)) CONVEX_HULL
FROM service_territories
WHERE units >= 1000;
CONVEX_HULL
POLYGON (( 20.00000000 40.00000000, 20.00000000 30.00000000, 30.00000000 30.00000000,
60.00000000 40.00000000, 60.00000000 60.00000000, 40.00000000 60.00000000, 20.00000000 40.00000000))
11/19/2012