7.2 SDO_NFE.CLASSIFY_LINES_BY_SIDE

Format

SDO_NFE.CLASSIFY_LINES_BY_SIDE(
     model_id    IN NUMBER,
     ll_rule_id  IN NUMBER,
     lines       IN NUMBER,
     lhs_indexes OUT DBMS_SQL,NUMBER_TABLE,
     rhs_indexes OUT DBMS_SQL,NUMBER_TABLE);

Description

Given a set of line features that match a connectivity Line-Line rule, this procedure classifies which lines lie on the left hand side of the rule and which ones on the right hand side.

Parameters

model_id

ID of the NFE model.

ll_rule_id

Connectivity Line-Line rule identifier.

lines

Set of line features that meet the rule..

lhs_indexes

Associative array where the indexes of the lines lying on the left hand side of the rule will be stored (in the form (index, index)).

rhs_indexes

Associative array where the indexes of the lines lying on the right hand side of the rule will be stored.

Usage Notes

The specified rule must be registered in the specified model. You can register a connectivity rule in the model tables or through the Java API.

Examples

The following example first gets all the interacting groups that meet the rule with ID 1 and then classifies the lines by side. Left hand side lines are output in lhs_indexes while rhs_indexes contain the rule’s right hand side lines.

DECLARE
  model_id    NUMBER := 1;
  ll_rule_id  NUMBER := 1;
  lines       SDO_INTERACT_LINE_FEAT_ARRAY;
  lhs_indexes dbms_sql.NUMBER_TABLE;  
  rhs_indexes dbms_sql.NUMBER_TABLE;
  inter_grps  SDO_INTERACTION_ARRAY;
BEGIN

  -- Get the groups of interacting features that meet the L-L Rule
  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
    lines := inter_grps(i).lines;

    -- For each group, classify the lines by rule side.
    sdo_nfe.classify_lines_by_side( model_id, ll_rule_id, lines, lhs_indexes, rhs_indexes );
  END loop;

END;