Syntax FACTORY_DEF IntersectionFactory [FACTORY_NAME ] [INPUT FEATURE_TYPE [ ]* []*]* [DUMP_TO ] [VERBOSE [(YES|NO)]] [MODE [(QUICK|COMPLETE)]] [HANDLE_ARCS_AND_ELLIPSES [(YES|NO)]] [OVERLAP_COUNT_ATTRIBUTE ] [SEGMENT_COUNT_ATTRIBUTE ] [ACCUMULATE_ATTRIBUTES (all|one|none)] [ACCUMULATE_COLLINEAR_ATTRIBUTES (all|one|none)] [INCOMING_PREFIX ] [LIST_NAME ] [SELF_INTERSECTION_ONLY [(YES|NO)]] [SEPARATE_COLLINEAR_SEGMENTS [(YES|NO)]] [NODE_NUMBER_ATTR ] [ACCUMULATE_NODE_ATTRIBUTES (all|one|none)] [ATTRIBUTE_PREFIX_ATTR ] [DISTINCT_ATTR ] [IGNORE_NODE_HEIGHTS [(YES|NO)]] [GROUP_BY []+]* [REJECT_INVALID_GEOM (Yes|No)] [OUTPUT (SEGMENT|NODE|ILLEGAL_GEOM|ORIGINAL|POINT|GRIDCOUNT|REJECTED) FEATURE_TYPE [ ]* []*]* Overview This factory takes a series of linear or polygonal features and inserts a node at each point where the input features cross. In addition, it removes any overlapping segments present in the input data. If desired, the attribute name given by the OVERLAP_COUNT_ATTRIBUTE clause will be added to the feature, and its value will be the number of input lines that overlapped on top of the output segment. When nodes are added, if the original features had measures, the new points will have the same measures, interpolated between the nearest points by distance along the connecting segment. For adding points to arcs, the distance around the perimeter of the arc is used. If SELF_INTERSECTION_ONLY is specified, then the factory only computes intersections on a feature-by-feature basis. Each feature is tested against itself and broken into pieces at each intersection point. No feature-to- feature comparisons are made. In this case, the value set to the OVERLAP_COUNT_ATTRIBUTE will be the number of features that result from removing self intersections. If the feature did not self-intersect, the attribute will be set to 1. The ACCUMULATE_ATTRIBUTES clause is responsible for choosing an attribute accumulation option for non-collinear segments. If NONE is selected, the transformer will drop all incoming attributes; if ALL is selected, the transformer will merge all incoming attributes; if ONE is selected, the transformer will get attributes from one of the features. The ACCUMULATE_COLLINEAR_ATTRIBUTES clause is responsible for choosing an attribute accumulation option for Collinear line segments. If NONE is selected, the transformer will drop all incoming attributes; if ALL is selected, the transformer will merge all incoming attributes; if ONE is selected, the transformer will get attributes from one of the features. If ACCUMULATE_ATTRIBUTES is set to ALL, the INCOMING_PREFIX can be used to prefix all incoming attributes of a feature. If the segment had several overlapping input features, the attributes of each of the input features will be added to the feature in the list identified by , if it was specified. In any case, each output feature is also assigned the attributes of one of its original input features. The FME also writes in a "direction" attribute as it fills out the list in LIST_NAME, putting same if the geometry is oriented in the same direction, and opposite if the geometry is oriented in the opposite direction to the current geometry. If SEGMENT_COUNT_ATTR is specified, an attribute named with the corresponding will be added to each output segment. This attribute contains the total number of output segments that correspond with the input feature from which this particular segment was obtained. If an input feature was broken into n output segments, each of those segments will have an attribute named which has a value of n. This factory differs from the ArcFactory in that it inserts new nodes into the data in order to break features - the input does not need to be correctly noded. If indicated, the node locations where intersections occurred are output as separate NODE features. If you would like each node to have a unique ID number, NODE_NUMBER_ATTR is the name of the attribute you want to store the ID number on the node feature itself. The ACCUMULATE_NODE_ATTRIBUTES clause is responsible for choosing an attribute accumulation option for the intersection nodes. If NONE is selected, the transformer will drop all incoming attributes; if ALL is selected, the transformer will merge all incoming attributes; if ONE is selected, the transformer will get attributes from one of the features. If ATTRIBUTE_PREFIX_ATTR is specified, then a list attribute is added to each node feature that contains information on all of the line segments that intersect at that location. The information that is placed on this list includes the angle the line segments intersect the node, whether the segment is incoming to or outgoing from the node, and all the segment's attributes. Here is an example of what would appear on a node feature if attrInfo is specified as the value for ATTRIBUTE_PREFIX_ATTR. (The order the segment information appears in the list is the order they intersect the node: counterclockwise from the right horizontal axis.) attribute name example value attrInfo{0}.fme_node_angle 45 attrInfo{0}.fme_node_direction outgoing attrInfo{0}.attributeA 7 attrInfo{0}.attributeB HWY 57 attrInfo{0}.attributeC 3.1 attrInfo{1}.fme_node_angle 90 attrInfo{1}.fme_node_direction incoming attrInfo{1}.attributeA 2 attrInfo{1}.attributeB Pine Street attrInfo{1}.attributeC 8.4 If DISTINCT_ATTR is specified, then not all line segments that intersect at that node will have the information listed in the format outlined above. The attribute listed here will be checked, and for each unique value of this attribute, one segment will be chosen to have its attributes listed. (This is most useful when you are not interested in having the information listed for each intersected line segment, but only the information from the unbroken "original" lines. In this case, specify an attribute that has a unique value for all input lines, and only one representative segment for each "original" line will have its information listed.) The creation of nodes can be calculated in 3D, if requested. Constructing nodes in 3D would mean that line segments would only share a node if they shared the same Z value at the point they intersected. Constructing nodes in 2D would mean that all intersecting segments would share a common node, regardless of their respective Z values. Consider, for example, a situation where two lines (which crossed) represented roads, where one road was an overpass above the other road. Suppose these two lines had differing elevations. If you constructed nodes in 3D, these two roads would not be linked to the same node where they crossed. Two nodes would be produced at the crossing point - each one with a different Z value. If you constructed nodes in 2D, these lines would both link to a common node, which would be present at the location where they crossed. In either the 2D or 3D case, the full dimensionality of the input is preserved in the output - 3D features are never converted to 2D. The 2D or 3D choice only indicates how the nodes are created and which lines are linked to them; it does not affect the dimension of the features that are output. The IGNORE_NODE_HEIGHTS directive specifies how the topology will be computed. If it is set to YES, the topology will be computed in 2D. If it is NO, the topology will be computed in 3D. The default is YES. This factory relies on a spatial index grid to optimize the search for intersections. The settings of this underlying grid can typically be ignored, as reasonable default values are used in all cases. However, the user may change any of the settings, detailed in the following paragraphs, based on input data specific properties, if desired. If the SEPARATE_COLLINEAR_SEGMENTS clause is specified, any line segments which are collinear are not merged together; instead, one copy is output for each original feature which shared that segment. Each such segment will have the respective original feature's attributes as its main attributes, and attributes from all other collinear features will be added as a list attribute, if the LIST_NAME clause is given. If the FME_GEOMETRY_HANDLING directive is set to "yes" in the mapping file, arcs that exist in the input (as arcs or ellipses) will be preserved as arcs in the output; these will otherwise be stroked to lines before intersections are processed. The "hidden" DUMP_TO directive will dump exactly what it is sending into the Sweeper to a file. Then the sweeper test program can be used to play this back to duplicate crashes, in the all-to-common case where they occur. When REJECT_INVALID_GEOM is Yes, the factory will output invalid features to Rejected port. Output Tags The IntersectionFactory supports the following output tags. ILLEGAL_GEOM Any original input features that were points, NULL geometry, etc. are immediately output via this tag. Normally, this is not specified. SEGMENT The intersected features are output by this tag. If the LIST_NAME was specified, these features will have an attribute containing their number of overlapping input features. They will also have all attributes of the original features. NODE The locations of every intersection are represented by point features and are output by this tag. The NODE_NUMBER_ATTR, ATTRIBUTE_PREFIX_ATTR, and DISTINCT_ATTR keywords modify which attributes are included on these output features. REJECTED Any original input features that were points, NULL geometry, etc. are immediately output via this tag. This takes precedence over ILLEGAL_GEOM if specified. TO BE RESOLVED VERBOSE, MODE, POINT, GRIDCOUNT and HANDLE_ARCS_AND_ELLIPSES clauses and ORIGINAL output tag added to Syntax section above, but not documented.