Question

Which transformer can I use? I have a survey area and retrieve a table via feature reader. I then want to divide these with each output port based on a distinct value in the table. It should be easy but can not find how to do it.


Badge +1

What I need to do is seperate the table by type. The types can be water, industries, woods etc. All are in the same table in postgis. So what I need to do is to get one outport for each value somehow. Later I will turn these in to raster data with 3dforcer. Can anyone help me?

 

Best regards

Jesper

 


6 replies

Badge +2

@flugan87​ It sounds like you're looking for either AttributeFilter or TestFilter.

Badge +1

@flugan87​ It sounds like you're looking for either AttributeFilter or TestFilter.

I've tried these. But then I need to manually write each attribute. What I want is to do this automaticly. As an example the table from postgis is called fastkart.mv. In table mv I want to have a outport for each distinct value. So I want one outport for each distinct value in this table. Can you do this in these transformers?

Badge +2

I've tried these. But then I need to manually write each attribute. What I want is to do this automaticly. As an example the table from postgis is called fastkart.mv. In table mv I want to have a outport for each distinct value. So I want one outport for each distinct value in this table. Can you do this in these transformers?

@flugan87​ Perhaps you can explain what your end goal is, then the community can give you a better answer.

If you want an output port for each unique value in the fastkart.mv table (the link is not accessible) then this implies that you want a separate pipeline in the workspace for each value. Perhaps what you need to explore is using Group Processing: usgin the 'type' on some of the down stream transformers, rather than splitting the the pipeline.

Userlevel 5
Badge +29

This sounds like you might need to make use of the Group By functionality in some transformers

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Group_Based_Transformers.htm

Badge

If the attributes are not dynamic, and you are just looking to avoid having to type them all the first time, you could use an AttributeFilter and then use the Import button on the lower right to bring in all of the values currently in fastkart.mv.

Badge +2

@flugan87​ If by 'output' you mean the target format, i.e. excel spreadsheet or geopackage, and you want a separate sheet or table for each 'type', then just use the 'type' attribute as part of the Feature Type name on your writer.

Reply