5.8 Feature Modeling Using Network Feature Editing (NFE)

Network feature editing (NFE) lets you create and manage an NFE model. An NFE model extends the feature modeling capabilities by enabling you to visualize and manipulate features using Java Swing components and a PL/SQL API.

NFE lets you define features on the top of an existing network. For example, restaurants and hotels can be defined as features on the top of a road network. You can also define models that consist just of features (network elements are hidden from you), and where the connectivity can be restricted by rules. Such connectivity restrictions are typically used in utility networks, such as electrical, water, or gas networks, to model the network devices and restrict the connectivity. One example of using connectivity restrictions is to avoid connections between high tension and low tension devices in an electrical network

NFE includes concepts such as feature classes and rules, which can be built into a model. Metadata tables and views are automatically created and maintained when you create and work with an NFE model.

The minimum privileges required for using NFE features are CREATE TABLE,CREATE VIEW, CREATE SEQUENCE, and CREATE SESSION. These are in addition to any other privileges that the user might need to perform operations not specifically related to NFE.

5.8.1 Creation Modes for NFE Models

You can create a network feature editing (NFE) model in one of two possible modes: from scratch and over an existing network model.

  • From scratch: In this mode, a network is generated automatically when you create the NFE the model, and the network is assign to the model. You will work only with features, and the underlying network elements will be hidden from you. This mode supports rules whose statements specify what kind of features (feature classes) can be connected with each other kinds of features. One typical use of this mode is to model utility networks, such as electricity or water networks, where you want to restrict the connections among certain components in the network.

  • Over an existing network model: In this mode, an existing network is used when you create the NFE model. The network is visible to you, and you can add features over the network elements. Rules are not supported in this mode.

The feature class relationship table contains information about the relationship between features and feature classes, that is, which feature belongs to which feature class.

5.8.2 NFE Feature Classes

A feature class describes a group of features based on attributes values, shape, and style. Each feature class belongs only to one feature layer, so the group of features in the feature class also belongs to the same feature layer.

For example, an electrical network might include two feature layers: Transformers and Conductors. Each of these feature layers might include two feature classes:

  • The Transformers feature layer might include the HT Transformers (high tension transformers) and LT Transformers (low tension transformers), where transformers within each feature type have specified input and output voltages, and tension types. Both feature types are associated with points (their shape). Each feature type has a different associated icon for use in diagrams.

  • The Conductors feature layer might include the HT Conductors (high tension conductors) and LT Conductors (low tension conductors), where conductors within each feature type have specified attribute values. Both feature types are associated with lines (their shape). Each feature type has a different associated icon for use in diagrams.

The following table lists the shapes that can be associated with a feature class, and requirements and restrictions depending on the creation mode used for the NFE model..

Table 5-3 Shapes for NFE Feature Classes

Shape Type (Number) Shape Name Model Created from Scratch Model Created over Existing Network
1 Point Features can have only one PointOnNode feature element. Features can have one or more feature elements of types PointOnNode and PointOnLine.
2 Line Features can have only one line feature element. A line supports connections only on its start and end points. Features can contain one or more line feature elements. It does not matter if the lines are adjacent or not.
3 Complex line Features can have multiple adjacent (connected) line feature elements. A complex line supports connection on its middle points; when this happens, the complex line is divided into two line feature elements. (Complex lines not supported for this creation mode.)
4 Path Feature representing a path. This type of feature class is typically used when analysis is performed. Feature representing a path. This type of feature class is typically used when analysis is performed.

5.8.3 NFE Rules

Rules in NFE models are constraints related to feature connections. Rules are available only for models created from scratch, that is, not for models created over an existing network. Rules can be customized, and can support any kind of connection constraint.

Rules can generally be classified into cardinality rules and connectivity rules:

  • Cardinality rules are used over point features that have specific characteristics (that is, belong to the same feature class), to specify the maximum and minimum number of incoming and outgoing connections that the point feature can accept.

  • Connectivity rules are used to indicate whether two features can be connected if they have some specific characteristics (feature layer, feature class, and attributes) and a specific interaction. A connectivity rule will allow the connection with a point feature as long as the point feature has available space to support the corresponding incoming and outgoing connections needed, as dictated by its related cardinality rule.

    Connectivity rules are the only way to connect features in NFE, and they are always positive; that is, they allow connections, but cannot deny them. The absence of connectivity rules between elements indicates that elements cannot be connected.

Line-Point Connectivity Rules

A line-point connectivity rule states that whenever a line feature and a point feature interact in certain ways, they can be connected.

A line-point connectivity rule, along with its cardinality rule, can be expressed as follows: “Any Line Feature from Feature Layer L1 with Feature Class C1 matching the condition P1 can be connected to a Point Feature from Feature Layer L2 with Feature Class C2 matching the condition P2. The cardinality of Point Feature indicates that maximum of X incoming connections and a maximum of Y outgoing connections are allowed.”

The following table shows examples of line-point connectivity rules.

Table 5-4 Examples of Line-Point Connectivity Rules

Line Condition Point Condition Cardinality Description
HT Conductor class from Conductors layer HT Transformer class from Transformers layer Unbounded Any number of high tension conductors can connect to a high tension transformer.
HT Conductor class from Conductors layer LT Transformer class from Transformers layer In: unbounded; Out: 0 Any number of incoming high tension conductors can connect to a low tension transformer, but no outgoing high tension conductors can be connected out from a low tension transformer.

A low tension transformer steps down the voltage from a high tension conductor to a low tension conductor.

LT Conductor class from Conductors layer LT Transformer class from Transformers layer Unbounded Any number of low tension conductors can connect to a low tension transformer.

Line-Line Connectivity Rules

A line-line connectivity rule states that when two line features interact in some specific way, they can be connected through one specific point feature. The rule can also specify to automatically create the connecting point, if it does not already exist, when the interaction between the feature lines occurs. Another way of looking at a line-line rule is as two line-point rules having in common the same point feature restrictions, so in that sense a line-line rule refers to two line-point rules with the same point feature condition.

An example line-line connectivity rule might be expressed as follows: “If interaction I is true between (Line Feature1 from Feature Layer L1 with Feature Class C1 matching the condition P1) AND (Line Feature2 from Feature Layer L2 with Feature Class C2 matching the condition P2) the lines can be connected using (Point Feature P1) (Optionally: create automatically Point Feature P1 if it does not exist).”

Left Hand Side and Right Hand Size of a Line-Line Connectivity Rule

A line-line connectivity rule specifies interaction between two line features: line feature 1 and line feature 2. These two line features are known as the left hand side (LHS) of the rule and the right hand side (RHS) of the rule, respectively. Any feature that is on line feature 1 is considered to be on the LHS of the rule, and any feature that is on line feature 2 is considered to be on the RHS of the rule.

The following table shows examples of line-line rules suitable for an electrical network model, identifying the LHS and RHS line feature groups of the rule. Each row in the table describes one line-line rule.

Table 5-5 LHS and RHS for Sample Line-Line Rules

LHS Line Features Group Interaction Type RHS Line Features Group Common Point Description
HT Conductor class from Conductors layer Touch end point HT Conductor class from Conductors layer HT Transformer class from Transformers layer High tension conductors are automatically connected to each other by a high tension transformer when they are touching on their end points.
LT Conductor class from Conductors layer Touch end point LT Conductor class from Conductors layer LT Transformer class from Transformers layer Low tension conductors are automatically connected to each other by a low tension transformer when they are touching on their end points.
HT Conductor class from Conductors layer Touch end point LT Conductor class from Conductors layer LT Transformer class from Transformers layer High tension conductors are automatically connected to low tension conductors by a low tension transformer when they are touching on their end points.

Rule Decision Handlers

Rules can be customized by using rule decision handlers, which can be applied to both line-point and line-line rules. Decision handlers are a mechanism that allows a user to determine which elements in an interaction must be connected and how.

A rule implementation always uses a decision handler to manage the connections among the features. NFE provides a default implementation to connect features for line-point and line-line rules. When executing a rule, the default decision handler implementation will try to connect as many elements matching the rule as possible, but there could be scenarios where you want more control over the connections than the rule provides by default, in which case you must modify the default decision handler implementation..

Using a water network example, assume that two valves can interact with pipes at a spatial point. Each valve has four outlets. Either (A) all four pipe ends can be connected to the four outlets of a single valve, or (B) two pipe ends can connect to two opposite outlets of one valve, and the two other pipe ends can connect to two opposite outlets of the other valve. The default decision handler implementation will try the first approach (all four pipe ends connecting to a single valve); but if you wanted to distribute the four pipes among the two available valves, you could implement a custom decision handler tio use the second approach (two pipe ends connecting to the first valve, the two other pipe ends connecting to the second valve).

Rule Instances

When features are connected because of the application of certain rule, the group of connected features is called a rule instance, that is, an instance of the rule that allowed the connection. Rule instances are maintained in the Rule Instance Table.

A rule definition can be removed or modified only if no dependent rule instances exist (that is, no connections that depend on any existing rule instances)

If a feature element involved in a rule instance is deleted, the rule instance may or may not be automatically deleted. If the feature element deletion causes the number of elements to drop below the minimum number for the rule instance (which depends on the type of rule), then the rule instance is deleted. However, if the feature element deletion does not cause the number of elements to drop below the minimum number for the rule instance, then the feature element is deleted from the rule instance, but the .the rule instance itself is not deleted (but it is modified).

5.8.4 Data Types Used for NFE Connectivity Rules

This section describes the following PL/SQL data types that are used for parameters and return values of some SDO_NFE package subprograms related to network feature editing (NFE):

  • SDO_INTERACT_POINT_FEAT_ARRAY

  • SDO_INTERACT_POINT_FEAT

  • SDO_INTERACT_LINE_FEAT_ARRAY

  • SDO_INTERACT_LINE_FEAT

  • SDO_INTERACTION_ARRAY

  • SDO_INTERACTION

SDO_INTERACT_POINT_FEAT_ARRAY is defined as VARRAY(1024) OF MDSYS.SDO_INTERACT_POINT_FEAT.

SDO_INTERACT_POINT_FEAT is defined as:

FEATURE_LAYER_ID   	NUMBER 
FEATURE_ID         	NUMBER 
FEATURE_CLASS_ID   	NUMBER
NODE_ID            	NUMBER 
NODE_GEOM          	SDO_GEOMETRY
AVAILABLE_IN_CONN  	SDO_NUMBER_ARRAYSET
AVAILABLE_OUT_CONN	SDO_NUMBER_ARRAYSET
RUNTIME_CREATED 		CHAR(1)

SDO_INTERACT_LINE_FEAT_ARRAY is defined as VARRAY(1024) OF MDSYS.SDO_INTERACT_LINE_FEAT.

SDO_NET_LAYER_FEAT is defined as:

FEATURE_LAYER_ID  	NUMBER
FEATURE_ID        	NUMBER
FEATURE_CLASS_ID  	NUMBER
LINK_ID           	NUMBER
LINK_GEOM         	SDO_GEOMETRY
START_NODE        	SDO_INTERACT_POINT_FEAT
END_NODE          	SDO_INTERACT_POINT_FEAT
BIDIRECTED        	CHAR(1)
INTERSECTION_LOCATION 	NUMBER
RULE_SIDE         	CHAR(1)

SDO_INTERACTION_ARRAY is defined as VARRAY (1048576) OF MDSYS.SDO_INTERACTION.

SDO_INTERACTION is defined as:

LINES             SDO_INTERACT_LINE_FEAT_ARRAY
POINTS            SDO_INTERACT_POINT_FEAT_ARRAY
INTERSECT_PT_GEOM SDO_GEOMETRY