29.2 SDO_PC_PKG.CLIP_PC_FLAT

Format

SDO_PC_PKG.CLIP_PC_FLAT(
     geometry       IN SDO_GEOMETRY, 
     table_name     IN VARCHAR2, 
     tolerance      IN NUMBER, 
     other_dim_qry  IN SDO_MBR, 
     mask           IN VARCHAR2 DEFAULT NULL 
     ) RETURN REF CURSOR;

Description

Performs a clip operation on a flat-format point cloud, in which the point cloud data is stored in a flat table.

Parameters

geometry

Two-dimensional geometry to serve as the clip window. For example:

geometry =>
  SDO_GEOMETRY(
    2003,
    NULL,
    NULL,
    SDO_ELEM_INFO_ARRAY(1, 1003, 3),
    SDO_ORDINATE_ARRAY(
      0.75, 0.75,
      1.25, 1.25))
table_name

Name of the table or view containing the point cloud data. The first two columns in the table or view must be named X and Y and be of type Oracle NUMBER. Optionally, following X and Y, the table or view can contain a Z column of type NUMBER, and additional nonspatial point cloud attributes. The additional nonspatial point cloud attributes can be any data type, but must be type Oracle NUMBER if they will participate as constraints in the other_dim_qry parameter.

tolerance

Tolerance value for objects in the point cloud (see Tolerance for information about spatial tolerance). If this parameter is null, the default value is 0.0000000000005

other_dim_qry

Minimum bounding rectangle (MBR) to provide a user defined query ranges for any Oracle NUMBER type columns (not including the X and Y columns).

The SDO_MBR type is defined as (LOWER_LEFT SDO_VPOINT_TYPE, UPPER_RIGHT SDO_VPOINT_TYPE) and SDO_V_POINT_TYPE is defined as VARRAY(64) OF NUMBER.

Specify NULL in the SDO_V_POINT_TYPE array for Oracle NUMBER type columns that are not constrained by a query range.

mask

The topological relationship of interest, as applicable to points interacting with polygons. Valid values are 'mask=<value>' where <value> is one or more of the mask values valid for the SDO_RELATE operator (TOUCH, OVERLAPBDYDISJOINT, OVERLAPBDYINTERSECT, EQUAL, INSIDE, COVEREDBY, CONTAINS, COVERS, ANYINTERACT, ON), or FILTER, which performs an approximate check. FILTER will return all the candidates that intersect the polygon, and possibly a few more. Multiple masks are combined with the logical Boolean operator OR (for example, 'mask=inside+touch'); however, FILTER cannot be combined with any other mask.

If this parameter is null or contains an empty string, mask=ANYINTERACT is assumed.

Usage Notes

This function works with flat-format point clouds, in contrast to SDO_PC_PKG.CLIP_PC, which works with input point cloud data stored in an SDO_PC object. The flat format has been added to point cloud support to offer an alternative to SDO_PC, depending on hardware environment and usage patterns. One advantage of the flat format is its dynamic nature, since updates to the point data do not require reblocking.

In environments other than Exadata, it is highly recommended that you create a compound B-tree index on the X, Y columns. In the compound B-tree index, also include any other Oracle NUMBER columns that will constrained with user-defined query ranges described for the other_dim_qry parameter. Any point cloud data update will result in an automatic update of that B-tree index.

Contrast this function with SDO_PC_PKG.CLIP_PC, which takes as input point cloud data stored in an SDO_PC object.

Modeling Solids describes how to use point clouds to model solids. It includes some discussion of the SDO_PC and flat table approaches for storing point cloud data.

Examples

The following example creates a view named INPTAB2 from the first three columns of a table named INPPTAB. It then performs a clip operation on the point cloud date.

CREATE VIEW inptab2 AS (select x x, y y, z z from inptab);
 
DECLARE
  my_cursor sys_refcursor;
  TYPE rec IS RECORD(x NUMBER, y NUMBER, z number);
  TYPE lst IS TABLE OF rec;
  result_list lst;
BEGIN
  my_cursor :=
    SDO_PC_PKG.CLIP_PC_FLAT(
      geometry =>
        MDSYS.SDO_GEOMETRY(
          2003,
          NULL,
          NULL,
          MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3),
          MDSYS.SDO_ORDINATE_ARRAY(
            0.75, 0.75,
            1.25, 1.25)),
      table_name    => 'INPTAB2',
      tolerance     => 0.05,
      other_dim_qry => null,
      mask          => null);
 
  FETCH my_cursor BULK COLLECT INTO result_list;
  FOR I in 1 .. result_list.COUNT LOOP
    dbms_output.put_line(
      '(' || result_list(i).x || ', ' ||
             result_list(i).y || ', ' ||
             result_list(i).z || ')');
  END LOOP;
  CLOSE my_cursor;
END;
/