Format
SDO_SAM.SPATIAL_CLUSTERS(
tablename IN VARCHAR2,
colname IN VARCHAR2,
max_clusters IN NUMBER,
allow_outliers IN VARCHAR2 DEFAULT 'TRUE',
tablepartition IN VARCHAR2 DEFAULT NULL
) RETURN SDO_REGIONSET;Description
Computes clusters using the existing R-tree index, and returns a set of SDO_REGION objects where the geometry column specifies the boundary of each cluster and the geometry_key value is set to null.
Parameters
Name of the data mining table.
Name of the column in tablename that holds the location coordinates.
Maximum number of clusters to obtain.
TRUE (the default) causes outlying values (isolated instances) to be included in the spatial clusters; FALSE causes outlying values not to be included in the spatial clusters. (TRUE accommodates all data and may result in larger clusters; FALSE may exclude some data and may result in smaller clusters.)
Name of the partition in tablename.
Usage Notes
The clusters are computed using the spatial R-tree index on tablename.
Examples
The following example clusters the locations in cities into at most three clusters, and includes outlying values in the clusters.
SELECT * FROM
TABLE(sdo_sam.spatial_clusters('PROJ_CITIES', 'LOCATION', 3, 'TRUE'));