--- In [email protected], "Cifelli, Scott T." <[EMAIL PROTECTED]> wrote: > > All- > > Is it possible to filter objects on the INPUT clause of a factory by > the feature name? For example, I have some features coming in like > this: > > POLE_EXI_LOCATION > POLE_RET_LOCATION > POLE_ANNOTATION > PRIMARY_EXI_ROUTE > ...etc > > I want only the features that have the word POLE and LOCATION in the > name to actually enter the factory. > > I am working with .fme files and workbench is not an option. I'm > assuming I need to use TCL but am looking for a simplier option if > it exists.
Hi Scott, Specifying POLE* or *LOCATION won't work, as you've probably noticed. Since you're already using mapping files, TCL isn't any more paintful. The TestFactory adds an attribute 'match' with value 'good' if the FeatureType contains POLE or LOCATION. Then, the input to the SamplingFactory is limited by the match attribute. Best Regards, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Safe Software Inc. Dan Iseminger Surrey, BC, CANADA Product Specialist tel:604.501.9985.278 [EMAIL PROTECTED] fax:604.501.9965 http://www.safe.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ================================================================= READER_TYPE NULL NULL_SOURCE_DATASET null # ================================================================= WRITER_TYPE NULL NULL_DATASET NULL # ================================================================= FACTORY_DEF * CreationFactory \ CREATE_AT_END no \ NUMBER_TO_CREATE 1 \ OUTPUT FEATURE_TYPE JUST_LOCATION # ================================================================= FACTORY_DEF * TeeFactory FACTORY_NAME Copier \ INPUT FEATURE_TYPE JUST_LOCATION \ OUTPUT FEATURE_TYPE POLE_EXI_LOCATION \ OUTPUT FEATURE_TYPE POLE_RET_LOCATION \ OUTPUT FEATURE_TYPE POLE_ANNOTATION \ OUTPUT FEATURE_TYPE PRIMARY_EXI_ROUTE \ OUTPUT FEATURE_TYPE * # ================================================================= FACTORY_DEF * TestFactory FACTORY_NAME "POLE or LOCATION" \ INPUT FEATURE_TYPE * \ TEST @Tcl2("expr [regexp -nocase LOCATION $FME_FeatureType]") = 1 \ TEST @Tcl2("expr [regexp -nocase POLE $FME_FeatureType]") = 1 \ BOOLEAN_OPERATOR OR \ OUTPUT PASSED FEATURE_TYPE * match good \ OUTPUT FAILED FEATURE_TYPE * # ================================================================= FACTORY_DEF * SamplingFactory FACTORY_NAME "limit" \ SAMPLE_RATE 1 \ INPUT FEATURE_TYPE * match good \ OUTPUT SAMPLED FEATURE_TYPE * \ how_many @Count("POLE or LOCATION") @Log("POLE or LOCATION") # ================================================================= Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/fme/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/fme/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
