ST_Aggr_ConvexHull
Nota:ST_Geometry solo en Oracle
Definición
ST_Aggr_ConvexHull crea una geometría única que es una envoltura convexa de una geometría que resultó de una unión de todas las geometrías de entrada. En efecto, ST_Aggr_ConvexHull es equivalente a ST_ConvexHull (ST_Aggr_Union (geometrías)).
Sintaxis
sde.st_aggr_convexhull (g1 sde.st_geometry)
Tipo de devolución
ST_Geometry
Ejemplo
El ejemplo crea una tabla de segmentos y ejecuta una declaración SELECT que agrega todas las geometrías, generando así un ST_Geometry que representa la envoltura convexa.
CREATE TABLE segments (id integer, shape sde.st_geometry);
INSERT INTO SEGMENTS (id, shape) VALUES (
1,
sde.st_linestring ('linestring (20 20, 30 30, 20 40, 30 50)', 0)
);
INSERT INTO SEGMENTS (id, shape) VALUES (
2,
sde.st_linestring ('linestring (5 5, 20 20, 25 30, 30 50)', 0)
);
INSERT INTO SEGMENTS (id, shape) VALUES (
3,
sde.st_linestring ('linestring (25 25, 35 35, 25 45, 35 55)', 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))
7/11/2012