23 SDO_GEOM Package (Geometry)

This chapter contains descriptions of the geometry-related PL/SQL subprograms in the SDO_GEOM package, which can be grouped into the following categories:

  • Relationship (True/False) between two objects: RELATE, WITHIN_DISTANCE

  • Validation: VALIDATE_GEOMETRY_WITH_CONTEXT, VALIDATE_LAYER_WITH_CONTEXT, SDO_SELF_UNION

  • Single-object operations: SDO_ALPHA_SHAPE, SDO_ARC_DENSIFY, SDO_AREA, SDO_BUFFER, SDO_CENTROID, SDO_CONVEXHULL, SDO_CONCAVEHULL, SDO_CONCAVEHULL_BOUNDARY, SDO_DIAMETER, SDO_DIAMETER_LINE, SDO_LENGTH, SDO_MBC, SDO_MBC_CENTER, SDO_MBC_RADIUS, SDO_MAX_MBR_ORDINATE, SDO_MIN_MBR_ORDINATE, SDO_MBR, SDO_POINTONSURFACE, SDO_TRIANGULATE, SDO_VOLUME, SDO_WIDTH, SDO_WIDTH_LINE

  • Two-object operations: SDO_CLOSEST_POINTS, SDO_DISTANCE, SDO_DIFFERENCE, SDO_INTERSECTION, SDO_MAXDISTANCE, SDO_MAXDISTANCE_LINE, SDO_UNION, SDO_XOR

The geometry subprograms are listed Table 23-1, and some usage information follows the table.

Table 23-1 Geometry Subprograms

Subprogram Description

SDO_GEOM.RELATE

Determines how two objects interact.

SDO_GEOM.SDO_ALPHA_SHAPE

Returns the alpha shape geometry of the input geometry, based on a specified radius value.

SDO_GEOM.SDO_ARC_DENSIFY

Changes each circular arc into an approximation consisting of straight lines, and each circle into a polygon consisting of a series of straight lines that approximate the circle.

SDO_GEOM.SDO_AREA

Computes the area of a two-dimensional polygon.

SDO_GEOM.SDO_BUFFER

Generates a buffer polygon around or inside a geometry.

SDO_GEOM.SDO_CENTROID

Returns the centroid of a polygon.

SDO_GEOM.SDO_CLOSEST_POINTS

Computes the minimum distance between two geometries and the points (one on each geometry) that are the minimum distance apart.

SDO_GEOM.SDO_CONCAVEHULL

Returns a polygon-type object that represents the concave hull of a geometry object.

SDO_GEOM.SDO_CONCAVEHULL_BOUNDARY

Returns a polygon-type object that represents the concave hull of a geometry object, based on boundary points rather than the alpha shape.

SDO_GEOM.SDO_CONVEXHULL

Returns a polygon-type object that represents the convex hull of a geometry object.

SDO_GEOM.SDO_DIAMETER

Returns the length of the diameter of a geometry object.

SDO_GEOM.SDO_DIFFERENCE

Returns a geometry object that is the topological difference (MINUS operation) of two geometry objects.

SDO_GEOM.SDO_DISTANCE

Computes the minimum distance between two geometry objects.

SDO_GEOM.SDO_INTERSECTION

Returns a geometry object that is the topological intersection (AND operation) of two geometry objects.

SDO_GEOM.SDO_LENGTH

Computes the length or perimeter of a geometry.

SDO_GEOM.SDO_MAX_MBR_ORDINATE

Returns the maximum value for the specified ordinate (dimension) of the minimum bounding rectangle of a geometry object.

SDO_GEOM.SDO_MAXDISTANCE

Computes the maximum distance between two geometry objects.

SDO_GEOM.SDO_MBC

Returns the minimum bounding circle of a geometry.

SDO_GEOM.SDO_MBC_CENTER

Returns the center of the minimum bounding rectangle of a geometry.

SDO_GEOM.SDO_MBC_RADIUS

Returns the length of the radius of the minimum bounding rectangle of a geometry.

SDO_GEOM.SDO_MBR

Returns the minimum bounding rectangle of a geometry.

SDO_GEOM.SDO_MIN_MBR_ORDINATE

Returns the minimum value for the specified ordinate (dimension) of the minimum bounding rectangle of a geometry object.

SDO_GEOM.SDO_POINTONSURFACE

Returns a point that is guaranteed to be on the surface of a polygon.

SDO_GEOM.SDO_SELF_UNION

Returns a valid geometry object that is the topological self union of one geometry object, which can be invalid.

SDO_GEOM.SDO_TRIANGULATE

Returns a collection of triangles resulting from Delaunay triangulation of the input geometry.

SDO_GEOM.SDO_UNION

Returns a geometry object that is the topological union (OR operation) of two geometry objects.

SDO_GEOM.SDO_VOLUME

Computes the volume of a three-dimensional solid geometry.

SDO_GEOM.SDO_XOR

Returns a geometry object that is the topological symmetric difference (XOR operation) of two geometry objects.

SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT

Determines if a geometry is valid, and returns context information if the geometry is invalid.

SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT

Determines if all geometries stored in a column are valid, and returns context information about any invalid geometries.

SDO_GEOM.WITHIN_DISTANCE

Determines if two geometries are within a specified distance from one another.

The following usage information applies to the geometry subprograms. (See also the Usage Notes under the reference information for each subprogram.)