7.17 SDO_NFE.GET_LP_CONN_INTERSECTIONS

Format

SDO_NFE.GET_LP_CONN_INTERSECTIONS(
     model_id               IN SDO_NUMBER,
     lp_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-point rule specified, and returns the set of connectable features groups.

Parameters

model_id

NFE model identifier.

lp_rule_id
Connectivity line-point rule identifier.. Must exist in the LINE_POINT_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-point 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-point 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-point 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-point 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 group of feature that can be connected according to a given line-point rule for each interacting group.

DECLARE
  model_id        NUMBER := 1;
  lp_rule_id      NUMBER := 1;
  rule_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-P Rule in the model
  inter_grps := sdo_nfe.get_interaction_groups( model_id, sdo_nfe.RULE_TYPE_LINE_POINT, lp_rule_id );

  -- For each group:
  FOR i IN 1..inter_grps.count loop
    -- Get the specific line features that match the L-P rule.
    rule_lines_indexes  := sdo_nfe.get_lines_match_lp_rule( model_id, lp_rule_id, inter_grps(i).lines );

    -- Get the specific point features that match the L-P rule.
    rule_points_indexes := sdo_nfe.get_points_match_lp_rule( model_id,  lp_rule_id, inter_grps(i).points );

    -- Get the group of features that can be connected according the L-P rule.
    conn_interacs := sdo_nfe.get_lp_conn_intersections( model_id, lp_rule_id, inter_grps(i), rule_lines_indexes, rule_points_indexes ); 
  END loop;
END;
/