Subsume Junctions


This sample command switches network junction features between differnt feature classes. For example, this command can switch an Emergency Valve to a Distribution Regulator. The command works with one selected network junction feature and the Editor's current target layer. The command is enabled only when an edit session is in progress and one network junction feature is selected.

Note, this functionality already exists in the Editor although it is usually a two step process. First, turn on snapping for the network default junctions. Select the junction requiring conversion. If this junction does not belong to the default junction feature class, delete it first to create an orphan junction. Only orphan junctions (default junctions) can be subsumed (switched) to a new feature class. Make sure the edit task is Create New Feature and the target layer is set to the desired feature class and subtype. Simply snap to the orphan junction and add a new coincident point - the network has its own logic to subsume orphan junctions instead of adding new points if a coincident point is added.

How to use:
  1. Browse and select the Subsumption.dll using the 'Add From File' button on the Customize dialog.
  2. From the 'Developer Samples' commands category, add the 'Subsume Junction' command to the Editor toolbar.
  3. Load network data with at least two different junction feature classes.
  4. Start an edit session.
  5. Select the junction feature you want to change.
  6. Set the target layer and subtype. This specifies the feature class the selected junction feature will be converted to.
  7. Click the command to complete the subsumption. This command is built with edit operations, click the Undo command to roll back the edit operation.


Requires: An edit session with network junction features

Difficulty: Intermediate

Visual Basic
File Description
SubsumeJunction.cls Implementation for the editor command.
Subsumption.RES Resource file for the command bitmap.
Subsumption.vbp The project file for the sample editor command.
Subsumption.dll The compiled project.

Key CoClasses: Editor
Key Interfaces: INetworkFeature, IGeometricNetwork, IRowTypes, ISubTypes
Key Members: INetworkFeature::GeometricNetwork, IGeometricNetwork::OrphanJunctionFeatureClass, ISubTypes::HasSubtype, IRowTypes::SubtypeCode