29.7 SDO_PC_PKG.CREATE_PC_UNIFIED
Format
CREATE_PC_UNIFIED( pc_type VARCHAR2, inp_table VARCHAR2, base_table VARCHAR2, data_table VARCHAR2, pc_id NUMBER, pc_tol NUMBER, blk_size NUMBER, srid NUMBER DEFAULT NULL, sfc_domain SDO_GEOMETRY DEFAULT NULL, sfc_type VARCHAR2 DEFAULT '2D Hilbert as NUMBER', -- ('2D Hilbert as NUMBER', '2D Hilbert as RAW') pc_extent SDO_GEOMETRY DEFAULT NULL, feature_table VARCHAR2 DEFAULT NULL, feature_block_link_table VARCHAR2 DEFAULT NULL, feature_buffer NUMBER DEFAULT NULL, drop_non_interacting_pts NUMBER DEFAULT 0, create_unblocked_table NUMBER DEFAULT 0, create_pyramid NUMBER DEFAULT 1, preserve_pyramid_leaves NUMBER DEFAULT 0 );
Description
Creates a point cloud of a configurable model (such as Hilbert R-tree blocked, R-tree blocked, Flat, or Hybrid).
Parameters
- pc_type
-
Point cloud type or model.
Supported point cloud types are:
- R-tree: Points are partitioned into geographic blocks, and this model is a variation of the R-tree structure.
- Hilbert R-tree: Points are partitioned into geographic blocks, and this model is a variation of the Hilbert R-tree structure.
- Feature-Blocked: Points are partitioned into geographic blocks, and this model is based on a given list of features (such as roads, postal codes, or building blocks).
- Flat: Points are directly stored in a plain or flat database table. In this case, Exadata uses Exadata Smart Scan, while non-Exadata uses a B-tree on (VAL_D1, VAL_D2) or (VAL_D1, VAL_D2, VAL_D3). Also, on non-Exadata platforms, the flat model slows down queries beyond point cloud sizes of one billion points.
- Hybrid or Hybrid Hilbert R-tree: Points are stored similarly to the flat model, except in an index-organized table using logical blocks similar to the Hilbert R-tree blocked model.
- inp_table
-
Name of the table or view containing the input point cloud data.
This table or view must have the following columns:
VAL_D1 (NUMBER)
: Ordinate in dimension 1VAL_D2 (NUMBER)
: Ordinate in dimension 2- ...
VAL_Dn (NUMBER)
: Ordinate in dimensionn
, wheren
is the highest-numbered dimension.n
must match thepc_tot_dimensions
parameter value in the call to the SDO_PC_PKG.INIT function when the point cloud was initialized.
- base_table
-
Name of the table in which the point cloud object will be stored.
The following shows an example DDL statement for creating this table:
CREATE TABLE pcs (id NUMBER, pc SDO_PC);
- data_table
-
Name of the table in which the point cloud data will be stored.
The following shows an example DDL statement for creating this table for a blocked model:
CREATE TABLE blocks AS SELECT * FROM mdsys.sdo_pc_blk_table WHERE rownum < 0;
For a flat or hybrid model, the table will be automatically created in the database schema.
- pc_id
-
Numerical point cloud
ID
. - pc_tol
-
Tolerance used in the point cloud.
- blk_size
-
Size of a block in points.
This applies when R-tree blocked, Hilbert R-tree blocked, or Hybrid are used.
- srid
-
SRID coordinate system used for the point cloud.
- sfc_domain
-
Not currently used.
- sfc_type
-
Not currently used.
- pc_extent
-
Geographic extent of the point cloud.
- feature_table
-
Name of the feature table used for feature blocking.
Points are blocked around the given features.
- feature_block_link_table
-
Table created to provide the foreign key links between the feature table (
feature_table
) and the point cloud block table (data_table
).For example:
SQL> desc feature_block_links; Name Null? Type ----------------------------------------- -------- --------- FEATURE_ID NUMBER OBJ_ID NUMBER BLK_ID NUMBER
- feature_buffer
-
Geographic buffer around each feature, such as a highway.
- drop_non_interacting_pts
-
Not currently used.
- create_unblocked_table
-
Not currently used.
- create_pyramid
-
Determines whether the point cloud can be organized in a pyramid, if blocked.
- preserve_pyramid_leaves
-
Determines whether all points must be only stored in one of the pyramid blocks, or whether non-leaf points can also be stored in the leaves.
Usage Notes
The CREATE_PC_UNIFIED function supports all point cloud models, in contrast to CREATE_PC, which supports only the R-tree blocked model. The query equivalent to this function is SDO_PC_PKG.CLIP_PC_INTO_TABLE, which also supports all models. The function SDO_PC_PKG.CLIP_PC only works on blocked models.
Examples
The following example creates a Hilbert R-tree blocked point cloud with
ID
value 12345
and block size
10000
.
call sdo_pc_pkg.create_pc_unified( pc_type => 'Hilbert R-tree', inp_table => 'INPTAB', base_table => 'PCS', data_table => 'BLOCKS', pc_id => 12345, pc_tol => 0.05, blk_size => 10000, srid => 27700, create_pyramid => 0 );
The following example creates a feature-blocked point cloud. It is blocked based on the number of given features, rather than automatic clustering.
create table features ( feature_id number, geom sdo_geometry); call sdo_pc_pkg.create_pc_unified( pc_type => 'Feature-Blocked', inp_table => 'INPTAB', base_table => 'PCS', data_table => 'BLOCKS', pc_id => 1, pc_tol => 0.05, blk_size => 10000, srid => null, feature_table => 'FEATURES', feature_block_link_table => 'FEATURE_BLOCK_LINKS', feature_buffer => 1, create_pyramid => 0 );
Parent topic: SDO_PC_PKG Package (Point Clouds)