7.16 SDO_NFE.GET_LL_CONN_INTERSECTIONS

Format

SDO_NFE.GET_LL_CONN_INTERSECTIONS(
     model_id               IN SDO_NUMBER,
     ll_rule_id             IN NUMBER,
     interaction_grp        IN OUT SDO_INTERACTION,
     rule_lhs_lines_indexes IN DBMS_SQL.NUMBER_TABLE,
     rule_rhs_lines_indexes IN DBMS_SQL.NUMBER_TABLE,
     rule_points_indexes    IN DBMS_SQL.NUMBER_TABLE,
     ) RETURN SDO_INTERACTION_ARRAY;

Description

Given a group of interacting features (lines and points) this function calculates subgroups of these features that can be connected according to the connectivity line-line rule specified, and returns the set of connectable features groups.

Parameters

model_id

NFE model identifier.

ll_rule_id
Connectivity line-line rule identifier.. Must exist in the LINE_LINE_RULE table.
interaction_grp
Group of interacting features. (The SDO_INTERACTION type is described in Data Types Used for NFE Connectivity Rules.)
rule_lhs_lines_indexes
Among the line features in the interacting group, indexes of the lines that match the left hand side of the line-line rule.
rule_rhs_lines_indexes
Among the line features in the interacting group, indexes of the lines that match the right hand side of the line-line rule.
rule_points_indexes
Among the point features in the interacting group, indexes of the points that match the point feature specification in the line-line rule. These points are the ones to be considered in the conformation of connectable groups.

Usage Notes

This function returns an SDO_INTERACTION_ARRAY object. (The SDO_INTERACTION_ARRAY type is described in Data Types Used for NFE Connectivity Rules.)

The indexes of LHS and RHS lines can be obtained with the SDO_NFE.CLASSIFY_LINES_BY_SIDE procedure. The indexes of the points can be obtained with the SDO_NFE.GET_POINTS_MATCH_LP_RULE function.

This function is registered by default in the Rule Decision Handlers Table when a line-line rule is created in a model (using the Java API). However, this function can be replaced by any other user function that calculates the group of connectable features in a customized way. See the information about Rule Decision Handlers under NFE Rules for information about customizing connections (rule decision handlers).

Examples

The following example gets the set of connectable feature groups for each interacting group that match a given line-line rule.

DECLARE
  model_id    NUMBER := 1;
  ll_rule_id  NUMBER := 1;
  rule_lhs_lines_indexes  dbms_sql.NUMBER_TABLE;
  rule_rhs_lines_indexes  dbms_sql.NUMBER_TABLE;
  rule_points_indexes     dbms_sql.NUMBER_TABLE;
  conn_interacs           SDO_INTERACTION_ARRAY;
  inter_grps              SDO_INTERACTION_ARRAY;
BEGIN 
-- Get the groups of interacting features that meet the L-L Rule in the model
  inter_grps := sdo_nfe.get_interaction_groups( model_id, sdo_nfe.RULE_TYPE_LINE_LINE, ll_rule_id );
  FOR i IN 1..inter_grps.count loop
    -- Classify the line features by side in the L-L rule (LHS, RHS).
    sdo_nfe.classify_lines_by_side( model_id, ll_rule_id, inter_grps(i).lines, rule_lhs_lines_indexes, rule_rhs_lines_indexes );
    -- Get the specific point features that match the L-L rule.
    rule_points_indexes := sdo_nfe.get_points_match_lp_rule( model_id,  1, inter_grps(i).points );
    -- Get the group of features that can be connected according the L-L rule.
    conn_interacs := sdo_nfe.get_ll_conn_intersections( model_id, ll_rule_id, inter_grps(i), rule_lhs_lines_indexes, rule_rhs_lines_indexes, rule_points_indexes);
  END loop;
END; 
/