ArcGIS Server Banner

ST_Aggr_ConvexHull

ST_Aggr_ConvexHull

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback
Note: This topic was updated for 9.3.1.

NOTE: Spatial type for Oracle only

Definition

ST_Aggr_ConvexHull creates a single geometry that is a convex hull of a geometry that resulted from a union of all input geometries. In effect, ST_Aggr_ConvexHull is equivalent to ST_ConvexHull(ST_Aggr_Union(geometries)).

Syntax

sde.st_aggr_convexhull (g1 sde.st_geometry)

Return type

ST_Geometry

Example

The example creates a segments table and executes a SELECT statement that aggregates the geometries of all the geometries, thereby generating an ST_Geometry representing the convex hull.

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))

See Also

  • An overview of SQL functions used with ST_Geometry types
  • Spatial operations