Solved

Give all feature values own output port

  • 21 April 2017
  • 6 replies
  • 48 views

Badge

Is there way in FME to give multiple output ports based on attribute values?

For example:

I have attribute called "TYPE", there is values like: line, point, polygon, text, info..... and so on.

I would like to make all these values to different branch in workspace, because all those need different kind handling. I know I could write all down in testfilter, but there can be over 100 different values what I need to write then.

Is there something like "import" for testfilter? In this case could be handy.

Or could there be other way to seperate these values?

icon

Best answer by takashi 21 April 2017, 08:06

View original

6 replies

Userlevel 2
Badge +17

Hi @a7, if you have the full list of possible values for "TYPE" with an external table such as CSV, Excel etc., you can import the list into the AttributeFilter and then use the transformer to filter the features by the value of "TYPE".

Badge +16

That is the way to go, unfortunatly if the "TYPE" values are different in your datasets you will need to manually upgrade the AttributeFilter.

You dont necessarly need the to have the values in an external dataset, you can use the source data as the source for the import in the AttributeFilter.

Badge

Hi @a7, if you have the full list of possible values for "TYPE" with an external table such as CSV, Excel etc., you can import the list into the AttributeFilter and then use the transformer to filter the features by the value of "TYPE".

Thank you again takashi and itay!

 

AttributeFilter spares my hours of writing!

 

Badge

One more guestion about import. Is it possible to make output ports in same order what its inside my excel file?

Lets say that my excel has values in order: text, string, polygon, Line..

But when I import it inside AttributeFilter, it comes in alphabetic order: Line, polygon, string, text..

Can I avoid this somehow?

Thank you for fast answering takashi and itay!

Badge +16

One more guestion about import. Is it possible to make output ports in same order what its inside my excel file?

Lets say that my excel has values in order: text, string, polygon, Line..

But when I import it inside AttributeFilter, it comes in alphabetic order: Line, polygon, string, text..

Can I avoid this somehow?

Thank you for fast answering takashi and itay!

unfortunalty I dont think you can, so arranging afterwards is the only way to do it.

 

 

Badge
unfortunalty I dont think you can, so arranging afterwards is the only way to do it.

 

 

Okay, maybe someday it would be possible to give sorting for imported values?

 

Thank you for introducing me on "new" transformer!

 

Reply