Syntax FACTORY_DEF NetworkFactory [FACTORY_NAME ] [INPUT (LINE|DESTINATION|SOURCE) FEATURE_TYPE [ ]* []*]+ [REJECT_INVALID_GEOM (Yes|No)] [GROUP_BY []+]* [FLUSH_WHEN_GROUPS_CHANGE (Yes|No)] [FIX_DIRECTION [(yes|no)]] [REORDER_NODES [(NONE|INTERMEDIATE|ALL)] [ITERATIONS ] [VERIFICATIONS ] [REPETITIONS ] [MAX_COST ] [TIME ] [REQUIRE_ALL_CONDITIONS [(NONE|ALL|ANY)]] [COMPLETION_CONDITION_ATTR ] [OUTPUT_STATS [(yes|no)]] [COMPUTE_STRAHLER_ORDER [(yes|no)]] [COMPUTE_NETWORK_TOPO [(yes|no)]] [COMPUTE_SHORTEST_PATH [(DIRECTED|UNDIRECTED)]] [COMPUTE_SINGLE_SOURCE_COSTS [(DIRECTED|UNDIRECTED)]] [DETECT_CYCLE [(yes|no)]] [COMPUTE_HORTON_ORDER [(yes|no)]] [COMPUTE_LEVEL_PRIORITY [(yes|no)]] [SINGLE_SOURCE_COST_OUTPUT [(Z_VALUES|MEASURE_VALUES ())] [STRAHLER_ORDER_ATTR ] [HORTON_ORDER_ATTR ] [TO_FROM_WEIGHT_ATTR ] [FROM_TO_WEIGHT_ATTR ] [SEGMENT_LIST_NAME ] [LIST_ATTRS_TO_INCLUDE []* ] [LIST_ATTRS_TO_INCLUDE_MODE (ALL|SELECTED)] [ARC_ID_ATTR ] [DIRECTION_ATTR ] [NETWORK_ID_ATTR ] [LEVEL_PRIORITY_ATTR ] [STROKE_CLASS_ATTR ] [STROKE_PRIORITY_ATTR ] [STROKE_PRIORITY_WEIGHT ] [STROKE_ANGLE_WEIGHT ] [STROKE_LENGTH_WEIGHT ] [OUTPUT (NETWORK|INVALID|UNUSED|PATH|CYCLE|EXTRA_DESTINATION|REJECTED) FEATURE_TYPE [ ]* []*]* Overview This factory takes linear features that represent the links in network(s) and perform one of the following modes: Mode 1: Compute Strahler and/or Horton order Mode 2: Fix the Flow of Network Lines Mode 3: Group network lines into distinct networks Mode 4: Shortest Path in a Network Mode 5: Determine Primary and Secondary Streams of River Networks Mode 6: Compute Optimal Cost from one Source node to All Connected Nodes Mode 1: Compute Strahler and/or Horton Order This mode is entered when COMPUTE_STRAHLER_ORDER and/or COMPUTE_HORTON_ORDER is specified. In this mode, the line features that represent a network is input through the LINE input tag and a point feature that represents the destination node is input through the DESTINATION input tag. The resulting lines will have new attribute(s) specified in the STRAHLER_ORDER_ATTR and/or HORTON_ORDER_ATTR and will have the Strahler order and/or Horton order values. Strahler order needs to be computed prior to the Horton order computation. Therefore, even if only COMPUTE_HORTON_ORDER is set to yes, Strahler order will also be computed. Sometimes, the orientation of the input lines need to be fixed to fit the flow direction to the destination node. If such operation is desired prior to the stream order computation, FIX_DIRECTION can be set to yes. Strahler order and Horton order cannot be computed if there is a cycle in the network. In order to detect cycles prior to the stream order calculation, users can check for cycles by specifying DETECT_CYCLE. If there are cycles, the nodes where the cycle occurs are output through the CYCLE port. Please refer to the documentation of StreamOrderCalculator transformer for more details. Mode 2: Fix the Flow of Network Lines This mode is entered when FIX_DIRECTION is set to Yes either as a stand alone operation or as a preprocessing step to the stream order computation in mode 1. In both cases, this mode expects the input lines of a network input through the LINE input tag and a destination node input through the DESTINATION_NODE input tag. This mode fixes the orientation of the network lines so that the flow of the lines will fit the downstream direction to the destination node. Each output line will have the attribute specified in DIRECTION_ATTR and its value is either 'same' for lines that keep their original orientation or 'reverse' for lines that have their orientation changed in the process. Please refer to the documentation of NetworkFlowOrientor transformer for more details. Mode 3: Group Network Lines into Distinct Networks This mode is entered when COMPUTE_NETWORK_TOPO is set to yes and network lines are input through the LINE input tag. This mode groups connected network lines and assign a unique network ID as an attribute specified in NETWORK_ID_ATTR to these features that belong in the same network. Please refer to the documentation of NetworkTopologyBuilder transformer for more details. Mode 4: Shortest Path in a Network This mode is entered when COMPUTE_SHORTEST_PATH is set to either DIRECTED or UNDIRECTED and lines, a source node and a destination node are input through the LINE, SOURCE and DESTINATION input tags respectively. This mode computes the shortest path from the source node to the destination node in a network based on the weight or cost of the lines. If DIRECTED is specified, then only FROM_TO_WEIGHT_ATTR needs to be specified. If UNDIRECTED is specified, then both FROM_TO_WEIGHT_ATTR and TO_FROM_WEIGHT_ATTR must be specified. The weights of the lines can be set by specifying the FROM_TO_WEIGHT_ATTR and TO_FROM_WEIGHT_ATTR as the costs of the original orientation of the lines and the reversed direction of the lines respectively. If only the original direction of the lines should be considered in the computation (in the case of an oriented network), then TO_FROM_WEIGHT_ATTR clause does not need to be specified. If a shortest path is found, the features that are part of the shortest path are output through the PATH port in an order such that the start point of the first feature is the source node and the end point of the the last feature output is the destination node. If the opposite orientation of a line is used in the shortest path, the value of the attribute specified in DIRECTION_ATTR has a value of 'opposite'. Otherwise, the value of the attribute is 'same'. Please refer to the documentation of NetworkTopologyBuilder transformer for more details. Mode 5: Determine Primary and Secondary Streams Of River Networks This mode is entered when COMPUTE_LEVEL_PRIORITY is set the yes and lines and destination nodes are input through the LINE and DESTINATION input tags. This mode takes the network lines from multiple network and destination nodes and determines the primary and secondary streams of the stream networks. Users need to specify the costs of the network lines in the same way as in Mode 3. These streams are output through the NETWORK port and tagged with a new attribute specified in LEVEL_PRIORITY_ATTR clause with value of 1 and 2 for primary and secondary streams respectively. Network lines are not connected to any destination node are output with the attribute value of -1. Please refer to the documentation of StreamPriorityCalculator for details of the algorithm. Mode 6: Compute Optimal Cost from one Source Node to all Connected Nodes This mode is entered when COMPUTE_SINGLE_SOURCE_COSTS is set to either DIRECTED or UNDIRECTED. In addition, source node and network lines must be input through the SOURCE and LINES input tags respectively. This mode is an extension to mode 3 in which optimal costs from a single source node to all connected nodes in the directed or undirected network are computed. FROM_TO_WEIGHT_ATTR and TO_FROM_WEIGHT_ATTR clauses must be specified in the same way as in Mode 3. The costs are assigned to each connected node either as Z values or Measure values depending on whether Z_VALUES or MEASURE_VALUES is specified. A measure name can be optionally set and default measure name is assumed when measure name is not set. If the Z_values is specified, each connected node will have its z-value set to the optimal cost from the source node to it. All lines that are connected to the source node are output through the NETWORK port and all disconnected lines that are output through the UNUSED port. Assumptions Only the end points of the linear features are considered topologically significant. Only one destination node can exist in a network and network can only consist of linear features. Lists If specified, a list with the given name is created on each feature output by the PATH tag. The contents of the list are the attributes of all input features corresponding to a given output feature. The optional LIST_ATTRS_TO_INCLUDE_MODE will specify if ALL attributes should be added to a list, or if only the SELECTED attributes (specified with the LIST_ATTRS_TO_INCLUDE clause) should be added to the list. If this value is not specified, it defaults to ALL. Output Tags The NetworkTopologyFactory supports the following output tags. NETWORK The network lines that are connected to a destination node, with new attributes added depending on the operation mode. INVALID Features do not have line geometry are output through this port, if the old version of the transformer is used. REJECTED Features do not have line geometry are output through this port and provided with the rejection code, if the new version of the transformer is used. EXTRA_DESTINATION Any extra features coming in from the DESTINATION port are output through this port. UNUSED Any input network lines that are not part of the results are output through this port. For example, in the shortest path computation (mode 4), any network lines that are not part of the shortest path are output through this port. CYCLE Points at which cycles occur in a network are output through this port (in the Stream Order calculation when DETECT_CYCLE is specified)