Syntax FACTORY_DEF RoutingFactory [FACTORY_NAME ] [INPUT FEATURE_TYPE [ ]* []*]* #[INPUT_FILTER ( (EXACT|GLOB|REGEX) | [] (EXACT|GLOB|REGEX|EXACT_NOCASE|GLOB_NOCASE|REGEX_NOCASE) ] [MULTI_READER_KEYWORD ] [ROUTE [::] [,,...] TO [::] [,,...] [COORDINATE_SYSTEM ] (GEOMETRY|ALIAS_GEOMETRY|PRESERVE_GEOMETRY) ] [FEATURE_TYPE_ATTRIBUTE [OUTPUT ROUTED FEATURE_TYPE [ ]* []*]* [OUTPUT NOT_ROUTED FEATURE_TYPE [ ]* []*]* #[OUTPUT INPUT_REJECTED FEATURE_TYPE # [ ]* # []*]* NOTES: The order of the parameters to ROUTE is a little misleading. The destination side is applied as follows: (1) geometry reprojection, if COORDINATE_SYSTEM is specified (2) transform from source to destination (3) destination spec is applied (the [,,...] after ) Feature types on the ROUTE line might be preceded by "::", so that their names don't conflict with factory keywords. These are identical to the same name without a leading "::". ================================================================================== EXAMPLE FOR INPUT ROUTING: (from squish_published_parameter_types (1).fmw) Lookup ___KnownFeatureTypes___ FoodVendors yes DrinkingFountains yes CommunityCentres yes TransitStations yes Parks yes AccessibleParking yes GarbageSchedule yes Libraries yes "" no FACTORY_DEF * TestFactory FACTORY_NAME "Unexpected Input Remover" INPUT FEATURE_TYPE * TEST @Lookup(___KnownFeatureTypes___,@FeatureType()) == yes OUTPUT PASSED FEATURE_TYPE * ------ BECOMES ------> FACTORY_DEF * RoutingFactory FACTORY_NAME "Router and Unexpected Input Remover" INPUT FEATURE_TYPE * ROUTE FILEGDB ::Libraries TO FME_GENERIC ::Libraries ALIAS_GEOMETRY ROUTE FILEGDB ::TransitStations TO FME_GENERIC ::TransitStations ALIAS_GEOMETRY ROUTE FILEGDB ::FoodVendors TO FME_GENERIC ::FoodVendors ALIAS_GEOMETRY ROUTE FILEGDB ::CommunityCentres TO FME_GENERIC ::CommunityCentres ALIAS_GEOMETRY ROUTE FILEGDB ::AccessibleParking TO FME_GENERIC ::AccessibleParking ALIAS_GEOMETRY ROUTE FILEGDB ::GarbageSchedule TO FME_GENERIC ::GarbageSchedule ALIAS_GEOMETRY ROUTE FILEGDB ::DrinkingFountains TO FME_GENERIC ::DrinkingFountains ALIAS_GEOMETRY ROUTE FILEGDB ::Parks TO FME_GENERIC ::Parks ALIAS_GEOMETRY OUTPUT ROUTED FEATURE_TYPE * ================================================================================== EXAMPLE FOR OUTPUT ROUTING: (from modified squish_published_parameter_types (1).fmw) FACTORY_DEF * TeeFactory FACTORY_NAME "DrinkingFountains -> NewFeatureType Correlator" INPUT FEATURE_TYPE DrinkingFountains OUTPUT FEATURE_TYPE __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id 0 @Transform(FME_GENERIC,FILEGDB) @SupplyAttributes(ENCODED,__wb_out_feat_type__,NewFeatureType) FACTORY_DEF * TeeFactory FACTORY_NAME "GarbageSchedule -> NewFeatureType Correlator" INPUT FEATURE_TYPE GarbageSchedule OUTPUT FEATURE_TYPE __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id 0 @Transform(FME_GENERIC,FILEGDB) @SupplyAttributes(ENCODED,__wb_out_feat_type__,NewFeatureType) FACTORY_DEF * TestFactory FACTORY_NAME "Final Output Feature Type Router" INPUT FEATURE_TYPE * TEST @Value(__wb_out_feat_type__) != "" OUTPUT PASSED FEATURE_TYPE * @FeatureType(@Value(__wb_out_feat_type__)) OUTPUT FAILED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") ------ BECOMES ------> FACTORY_DEF * RoutingFactory FACTORY_NAME "DrinkingFountains,GarbageSchedule -> NewFeatureType Correlator" INPUT FEATURE_TYPE DrinkingFountains INPUT FEATURE_TYPE GarbageSchedule ROUTE FME_GENERIC ::DrinkingFountains TO FILEGDB ::NewFeatureType __wb_out_feat_type__ NewFeatureType PRESERVE_GEOMETRY ROUTE FME_GENERIC ::GarbageSchedule TO FILEGDB ::NewFeatureType __wb_out_feat_type__ NewFeatureType PRESERVE_GEOMETRY OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") ================================================================================== Overview This factory implements a routing mechanism for incoming features and outgoing features. The MERGE specs correspond to feature type merging on the input feature type nodes, and are used to group feature types into a single route. The ROUTE specs are used to redirect the feature types to their output, including transformation to the target writer type, coordinate system reprojection and application of output specs. If MERGE definitions or "MERGE_INPUT yes" clauses are present, the set of merge patterns given in the factory definition are combined with the _MERGE_DEF keys in the mapping file, and input features are merged accordingly. In absence of either of these keywords, features are not merged but are passed directly into the routing section. Output Tags ROUTED - Features that matced the ROUTE statements & were routed to an output NOT_ROUTED - Features which didn't match any ROUTE statements #INPUT_REJECTED - Features which didn't pass the INPUT_FILTER conditions & # were thus never actually processed by the factory.