Syntax FACTORY_DEF SmallworldGeometryFactory [INPUT FEATURE_TYPE [ ]* []*]* [ORIG_FEAT_TYPE_ATTR ] [KEEP_SECTORS] [KEEP_MULTI_GEOM] [STROKE_ALL_ARCS] [FEATURE_TYPE_GENERATOR (UNDERSCORE|ANGLE_BRACKETS)] [OUTPUT (CHANGED|UNCHANGED) FEATURE_TYPE [ ]* []*]* Overview This factory is used to flatten the geometry structure of features generated by the GE Smallworld reader. It accepts input Smallworld features which may contain an aggregate of geometry from zero or more geometric attributes and, unless the KEEP_MULTI_GEOM attribute is specified, it generates a separate feature for each contained geometry. Unless otherwise directed with the KEEP_SECTORS directive, this factory also joins together the sectors of each multiple-sector sworld_chain or sworld_rope geometric attribute to form a single line string, polygon or donut geometry for the attribute. Any input feature that contains no geometric attributes is passed through the factory unchanged. Note that in an email dated Jan. 19, 2012, Mark S. passes on the claim from Smallworld that their reader no longer passes unstroked arcs to this factory. No mention is made as to whether the stroked arcs will have their points in the correct direction or not. An instance of this factory is all that is needed to process the features output from the Smallworld format reader so that they resemble the "normal" structure of geometric features passed through the FME. Features whose geometry is changed by the factory - that is, its sectors were joined or its multiple geometry attributes were split into multiple features - are output with the CHANGED tag. If the factory had no effect on the input feature's geometry, it will be output with the UNCHANGED tag. Tip: The UNCHANGED tag indicates that the geometry of the feature was unchanged. It is possible for attributes to be defined or changed on output features tagged with this keyword. The ORIG_FEAT_TYPE_ATTR keyword is used to instruct the factory to change the feature type of the output features to _, where is the feature type of the original feature and is the name of the geometric attribute contained in the output feature. In this case, the parameter to the ORIG_FEAT_TYPE_ATTR keyword names an attribute on the output feature into which the feature type of the original input feature is written. Essentially, this feature makes a separate feature type for each geometric attribute defined on a Smallworld table instead of a feature type for the whole table. If the keyword FEATURE_TYPE_GENERATOR is specified, then the feature types will be modified as this keyword directs. UNDERSCORE would modify the feature types as indicated above, featureType_attrName and ANGLE_BRACKETS would modify them like the following featurType. The default is UNDERSCORE. Output Feature Attribution ~~~~~~~~~~~~~~~~~~~~~~~~~~ In addition to the attribute defined by the optional ORIG_FEAT_TYPE directive, each output feature will likely have some geometry-related attributes defined on it. The only exceptions are: When the input feature does not contain any geometric attributes When the KEEP_MULTI_GEOM directive is contained in the factory definition, in which case the output features have the same "aggregated multiple geometric attribute" form that the Smallworld format reader generates Except in the two instances just detailed, every attribute named sworld_geometry{n}., as assigned by the Smallworld reader, is copied into an attribute named "" on the output feature. If the geometry of the feature is a single arc, circle, ellipse or spline, then each sector-related attribute will also be copied from sworld_geometry{n}.sector{m}. to an attribute named "". Single-sector chain and area geometries are discussed in the following section. In addition, every output feature containing a single geometry has an attribute named sworld_geom_type defined on it. This attribute indicates the type of geometry contained in the feature. It has one of the following values. sworld_point The feature has a point geometry, with all point-related attributes defined by the Smallworld format reader. sworld_text The feature has a point geometry, with all text-related attributes defined by the Smallworld format reader. sworld_area The feature has a polygon or donut geometry. sworld_line The feature has a simple line geometry, that is, a string of points. sworld_arc The feature has a point geometry, with all arc-related attributes defined by the Smallworld format reader. sworld_circle The feature has a point geometry, with all circle-related attributes defined by the Smallworld format reader. sworld_ellipse The feature has a point geometry, with all ellipse-related attributes defined by the Smallworld format reader. sworld_spline The feature has a simple line geometry, or string of points, with all spline-related attributes defined by the Smallworld format reader. Deaggregation of Chains and Areas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Normally, the GeometryFactory combines the sectors of each sworld_chain or sworld_area geometry into a single line, polygon or donut geometry. Arcs, circles, and ellipses contained in the sector sequence are stroked into point sequences, in the same way an @Arc() function call would operate on such a geometry, before being inserted into the output line string. If a spline sector is encountered, its data points are strung together as if they were a simple line sector. There are two cases in which the sectors of an sworld_chain or sworld_area geometry would not be combined into a single output geometry. The first is when the KEEP_SECTORS directive is specified in the factory definition. If this is specified, the original aggregate of sectors' geometry will remain on the output feature and the sworld_sector{m}. attributes would not be copied to "" attributes. The second case, in which the sectors of an sworld_chain or sworld_area geometry would not be combined into a line string, polygon or donut feature, would be if the geometry contained a single sector and if that sector was an arc, ellipse, circle or spline. If this were to occur and the factory was operating in the "join sectors" mode - that is, KEEP_SECTORS was not specified - the output feature would have the deaggregated sector geometry in its original form and the sworld_geom_type attribute would contain a value of sworld_arc, sworld_ellipse, sworld_circle or sworld_spline, respectively. Assumptions It is assumed that the input features are constructed exactly as the features generated by the Smallworld format reader. That is, it is assumed the geometry of the feature is: An aggregate of the feature's geometric attributes' geometries That chain and area geometries are themselves aggregates of the chain or area sectors That the sworld_geometry{n}.* attributes, as defined by the Smallworld reader, correspond to the actual structured geometry contained in the feature If the input features are not constructed in this manner, the output from the GeometryFactory is undefined. Output Tags The GeometryFactory supports the following output tags. CHANGED This tag is applied to output features whose geometry is somehow different from the feature which was input. This is normally the case if the feature contained more than one geometric attribute or if it contained any sworld_chain or sworld_area attributes. UNCHANGED This tag is applied if the feature's geometry was not changed by the processing of the factory. This would be the case if there was no geometry on the input feature or if the KEEP_MULTI_GEOM tag was specified and the feature contained no sworld_chain or sworld_area attributes. Features tagged as UNCHANGED may still have attributes added to them to satisfy the geometry attribution described below and the ORIG_FEAT_TYPE directive, if specified.