Syntax FACTORY_DEF TopologyFactory [FACTORY_NAME ] [INPUT FEATURE_TYPE [ ]* []*]+ [GROUP_BY []+]* [FLUSH_WHEN_GROUPS_CHANGE (Yes|No)] [MAX_COORDS ] [ARC_NUMBER_ATTR ] [FROM_NODE_ATTR ] [TO_NODE_ATTR ] [RIGHT_POLY_ATTR ] [LEFT_POLY_ATTR ] [LEFT_EDGE_ATTR ] [RIGHT_EDGE_ATTR ] [NODES_ATTR ] [PROPAGATE_ATTRS [(yes|no)]] [LIST_ATTRS_TO_INCLUDE_NODES []* ] [LIST_ATTRS_TO_INCLUDE_MODE_NODES (ALL|SELECTED)] [LIST_ATTRS_TO_INCLUDE_EDGES []* ] [LIST_ATTRS_TO_INCLUDE_MODE_EDGES (ALL|SELECTED)] [LIST_ATTRS_TO_INCLUDE_FACES []* ] [LIST_ATTRS_TO_INCLUDE_MODE_FACES (ALL|SELECTED)] [POLYGONS_ATTR ] [POLYGON_NUMBER_ATTR ] [ARCS_ATTR ] [PERIMETER_ATTR ] [AREA_ATTR ] [NODE_NUMBER_ATTR ] [ANGLE_PREFIX_ATTR ] [UNIVERSE_GEOMETRY [(yes|no)]] [IGNORE_NODE_HEIGHTS [(yes|no)]] [OVERLAPPING_DATA_PREFIX_ATTR ] [START_EDGES_ONLY [(no|yes|disjoint)]] [ALLOW_CYCLES [(yes|no)]] [ASSUME_CLEAN_DATA [(yes|no)]] [GENERATION_MODE [(EXISTING|ENDS|INTERSECT)]] [MODE [(QUICK|COMPLETE)]] [DEAGGREGATE_INPUT [(yes|no)]] [CLEANING_TOLERANCE (NONE|AUTO|)] [OUTPUT (LINE|POLYGON|NODE|UNIVERSE_POLYGON|ILLEGAL_GEOM) FEATURE_TYPE [ ]* []*]* Overview This factory takes point, linear and/or polygonal features, pushes them into a topology model, and outputs them with all of their topology information. Topologically significant nodes, lines, and polygons are computed using all input features. The factory does not assume that all input data is clean and noded properly, unless the GENERATION_MODE or ASSUME_CLEAN_DATA flag are set appropriately. The topology can be constructed in 3D, if requested. Constructing a topology in 3D would mean that line segments would only be topologically linked if they shared the same Z value at the point they intersected. Constructing a topology in 2D would mean that all intersecting segments would be topologically connected to each other at 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 the topology in 3D, these two roads would not be linked to the same node where they crossed. If the topology was constructed 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 topology is created; it does not affect the dimension of the features output. By default, the UNIVERSE_POLYGON does not have any geometry when it is returned. It does have a list of the arcs which form the universe polygon. If the UNIVERSE_GEOMETRY directive is set to yes, then the universe polygon will also have a polygonal geometry. If any input polygons are 3D, then the universe polygon will be 3D; otherwise it will be 2D. All output lines that form the border of a polygon and are collinear with input lines will have the attributes from the input lines merged onto the output border lines. No original attributes are overwritten. The input features may be grouped into separate topology sets based on attribute values. All attributes are carried across from the INPUT features to the output features. The factory has the following clauses that specify the attribute names to use for assigning topology information. The clauses are as follows: MAX_COORDS The number indicates the maximum length to output any line. If any line contains more than this number of coordinates, it will be broken into pieces which are output separately, each with their own line IDs, and correctly noded. UNIVERSE_GEOMETRY If this is yes, the universe polygon returned will have complete geometry on it. If it is no, the universe polygon will take less time to create because it will have no geometry, but will have links to the arcs that form the boundary of the polygon. The default is no. IGNORE_NODE_HEIGHTS If this is yes, the topology will be computed in 2D. If it is no, the topology will be computed in 3D. The default is yes. ARC_NUMBER_ATTR The name of the attribute field used on each output linear element to contain its unique identifier. Each line which is output from the model has a unique identifier, numbered increasing from 1. (This attribute will appear on output LINEs only.) FROM_NODE_ATTR The attribute into which the ID of the starting node is placed. The nodes are uniquely numbered increasing from 1. (This attribute will appear on output LINEs only.) TO_NODE_ATTR The attribute into which the ID of the end node is placed. The nodes are uniquely numbered increasing from 1. (This attribute will appear on output LINEs only.) RIGHT_POLY_ATTR The field into which the ID of the polygon on the right side is placed. (If there are multiple such polygons, only one of their IDs will be noted.) The right side is defined to be that polygon which is on the right of the line when travelling from the FROM_NODE to the TO_NODE along the arc. The UNIVERSE_POLYGON is given an ID of 0. (This attribute will appear on output LINEs only that were originally input as polygons. Any output LINEs originally input as lines will not have this attribute when output.) LEFT_POLY_ATTR The field into which the ID of the polygon on the left side is placed. (If there are multiple such polygons, only one of their IDs will be noted.) The left side is defined to be that polygon which is on the left of the line when travelling from the FROM_NODE to the TO_NODE along the arc. The UNIVERSE_POLYGON is given an ID of 0. (This attribute will appear on output LINEs only that were originally input as polygons. Any output LINEs originally input as lines will not have this attribute when output.) LEFT_EDGE_ATTR The field into which is placed the ID of the line that forms the left edge in a winged-edge topology. Of the lines that connect to the arc's starting node, this is the first that is reached in a counterclockwise direction from the arc. If neither this nor RIGHT_EDGE_ATTR is specified, a winged- edge topology is not computed. RIGHT_EDGE_ATTR The field into which is placed the ID of the line that forms the right edge in a winged-edge topology. Of the lines that connect to the arc's ending node, this is the first that is reached in a clockwise direction from the arc. If neither this nor LEFT_EDGE_ATTR is specified, a winged- edge topology is not computed. NODES_ATTR See PROPAGATE_ATTRS (NODES_ATTR is only applicable when this clause is specified). PROPAGATE_ATTRS If this option is specified, attribute lists from the relevant input features for each output are created. For each node, this will be a list of lines and a list of polygons touching the node; for lines, there will be a list of nodes and a list of polygons; and for polygons, list of nodes and list of lines. The attribute names given by NODES_ATTR, ARCS_ATTR, and AREA_ATTR will be used as the base names for the lists. LIST_ATTRS_TO_INCLUDE_MODE_NODES Only applicable when "PROPAGATE_ATTRS is true, and a list name is given for the nodes. The optional LIST_ATTRS_TO_INCLUDE_MODE_NODES will specify if ALL attributes should be added to the lists that come from nodes, or if only the SELECTED attributes (specified with the LIST_ATTRS_TO_INCLUDE_NODES clause) should be added to the lists. If this value is not specified, it defaults to ALL. LIST_ATTRS_TO_INCLUDE_MODE_EDGES Similar to "LIST_ATTR_TO_INCLUDE_MODE_NODES", but for the edge lists. LIST_ATTRS_TO_INCLUDE_MODE_FACES Similar to "LIST_ATTR_TO_INCLUDE_MODE_NODES", but for the face lists. POLYGONS_ATTR The field into which all the IDs of the polygons which are either on the left or right of this line are placed. The left side is defined to be that polygon which is on the left of the line when travelling from the FROM_NODE to the TO_NODE along the arc. The right side is defined to be that polygon which is on the right of the line when travelling from the FROM_NODE to the TO_NODE along the arc. The UNIVERSE_POLYGON is given an ID of 0. All the IDs are listed in a comma separated character string, with the IDs of the polygons on the left having a negative sign in front of them. Typically, this list will have two entries, but in invalid coverages this list could hold more than two IDs. (This attribute will appear on output LINEs only that were originally input as polygons. Any output LINEs originally input as lines will not have this attribute when output.) POLYGON_NUMBER_ATTR The unique identifier assigned to each polygon which is output from the factory, numbered increasing from 1. The universal polygon is given an identifier of 0. (This attribute will appear on output POLYGONs and UNIVERSE_POLYGON only.) ARCS_ATTR Output for each polygon, this is the name of the attribute that contains the list of the IDs of the arcs which form the polygon's boundary. All the IDs are listed in a comma-separated character string. If a given arc has the opposite orientation to the respective segment in the polygon boundary, its ID will have a negative sign in front of it. If an output polygon has multiple pieces (that is, has a hole), then the arc numbers for the outer shell will be first, followed by the number "0" indicating the end of the arc list for the outer polygon. The list of arcs for the first hole would then be followed by another "0" and so on until all holes have been represented. (This attribute will appear on output POLYGONs and UNIVERSE_POLYGON only.) ARCS_LIST_ATTR Gives the name of a list to store all attributes that come from edges. If not given, the list name will default to ARCS_ATTR PERIMETER_ATTR The attribute into which the perimeter of the polygon will be stored. The UNIVERSE_POLYGON will have its perimeter given as negative. (This attribute will appear on output POLYGONs and UNIVERSE_POLYGON only.) AREA_ATTR The attribute into which the area of the polygon will be stored. The UNIVERSE_POLYGON will have its area given as negative. (This attribute will appear on output POLYGONs and UNIVERSE_POLYGON only.) AREA_LIST_ATTR Gives the name of a list to store all attributes that come from areas. If not given, the list name will default to AREA_ATTR NODE_NUMBER_ATTR The fieldname that will be used to contain the number of the node, specified for node features. Numbered from 1 up. (This attribute will appear on output NODEs only.) ANGLE_PREFIX_ATTR The fieldname of the list attribute to contain information on all of the lines that intersect at this topologically significant location. The information that is placed on this list includes the angle the line segments intersect the node, the ID number of each line segment, and whether the segment is incoming to or outgoing from the node. (This attribute will appear on output NODEs only.) Here is an example of what would appear on a node feature if attrInfo is specified as the value for ANGLE_PREFIX_ATTR. attrInfo{0}.fme_node_id 14 attrInfo{0}.fme_node_angle 45 attrInfo{1}.fme_node_id -82 attrInfo{1}.fme_node_angle 90 attrInfo{2}.fme_node_id 61 attrInfo{2}.fme_node_angle 180 attrInfo{3}.fme_node_id -112 attrInfo{3}.fme_node_angle 304 The order the segment information appears in the list is the order in which they intersect the node, counterclockwise from the right horizontal axis. If the ID number is negative, this indicates the line's direction with respect to this node is incoming; a positive sign indicates the line is outgoing. In the example above, lines #82 and #112 are incoming, while lines #14 and #61 are outgoing. OVERLAPPING_DATA_PREFIX_ATTR If this keyword contains a non-empty value, it sets the factory into a mode where no collinear lines or overlapping points are output at all, whether they came from source linear features or from the borders of source area features or input points, or calculated as intersection points. In this mode, all output lines or points which were overlapping with at least one direct input will contain a list attribute with information about each input with which it was overlapping. This keyword sets the fieldname of the list attribute to contain all the attributes (that do not start with "fme_") from all of the input lines or points that were overlapping with the final output line or point. A side effect of this option is that only arcs that form part of a polygon boundary will be considered in the calculation of LEFT_EDGE_ATTR and RIGHT_EDGE_ATTR. (All arcs originating only from line input will have their own ID supplied as their left edge ID, and the negation of this as their right edge ID.) START_EDGES_ONLY If this keyword is "no", than the universe feature is the standard computed universe and the "arcs" attribute on each polygon will contain all the arcs that made up that polygon. If this keyword is "yes", there will be a different universe feature for each shell of the universe and the "arcs" attribute on each area will only contain a single unsigned ID of one of the edges per ring. If this keyword is "disjoint", the output will be similar to when the keyword is "yes" except that the IDs topologically connected donut holes will be omitted. ALLOW_CYCLES If this keyword is specified, then coordinate "cycles" within polygons are allowable and correct edge lists will be generated for such polygons. A "cycle" is an edge that occurs twice in the same polygon's boundary - once forwards and once backwards. This edge's ID will appear twice in the polygon's edge list, positive in one instance and negative in the other. ASSUME_CLEAN_DATA Deprecated. Use "GENERATION_MODE" instead. If this keyword is specified and set to yes, then the input data is assumed to be correctly intersected and clean. In that case, no intersection is performed. Otherwise, the intersections of the data are computed prior to constructing the topology. GENERATION_MODE The three possible options are: EXISTING: Build a topology from only the existing nodes ENDS: Build a topology from only the existing end nodes INTERSECT: Intersect the input, then build a topology from the resulting nodes. If unspecificed, the default mode of this factory is "INTERSECT." DEAGGREGATE_INPUT If this keyword is specified and set to yes, than all the input features with collection geometries will be deaggregated. Composites will not be split and shared geometries will not be instantiated. CLEANING_TOLERANCE If the CLEANING_TOLERANCE keyword does not exist or has the value "NONE", no cleaning will be performed. If the CLEANING_TOLERANCE directive specifies a non-negative number, geometries within this tolerance will be merged. If the CLEANING_TOLERANCE is AUTO, a cleaning tolerance will be automatically generated based on the input geometries. GROUP_BY This clause allows for creating separate topologies depending on one or more attributes on the input features. Topologies will only be formed from input features whose group by attributes (as specified by this clause) are identical. FLUSH_WHEN_GROUPS_CHANGE If the GROUP_BY clause is specified, this clause (when set to Yes) will cause the factory to process and output the current group immediatedly when an attribute that does not belong to the current group is encountered. Output Tags The TopologyFactory supports the following output tags. LINE All topologically significant lines are output. They have the attributes FROM_NODE_ATTR, TO_NODE_ATTR, RIGHT_POLY_ATTR, LEFT_POLY_ATTR and POLYGONS_ATTR specified as directed by the factory clauses. POLYGON The polygonal entities constructed are output here. These have a list of the LINEs which make up the polygon along with the actual geometry. NODE All topologically significant nodes are output. They have the attributes NODE_NUMBER_ATTR and ANGLE_PREFIX_ATTR specified as directed by the factory clauses. UNIVERSE_POLYGON This is the polygon that represents everything not covered by any of the input polygons. This feature consists of a list of the defining LINE identifiers that make it up. If universe polygon geometry is requested (with the UNIVERSE_GEOMETRY tag), the geometry will essentially comprise the "holes" in the universe - essentially this is the input polygons dissolved together and oriented with the left-hand rule. ILLEGAL_GEOM Any input features which are not points, lines, polygons, or donut polygons, are output with this tag. TO BE RESOLVED MODE clause added to Syntax section above, but not documented.