Skip to main content

I use a Sorter to sort on some attributes.

When using the Dissolver with a GroupBy attribute and the Accumulation Mode ‘Use Attributes From One Feature’ after the Sorter I assumed the attributes are taken from the first feature of the sorted group. (Basically the same behavior as for a combination of Sorter/Matcher or Sorter/DuplicateFilter).

However the Dissolver seems to work differently. The considered feature seems to be random (maybe a geometry condition drives which feature “wins”?).

So the question is, how can I use the Dissolver so that always the first feature of my sorted group “wins”?

I have an ugly mitigation flow with Tester, Duplicate Filter, AttributeKeeper, FeatureJoiner which is not really smart but cumbersome.

Any ideas?

Klaus

 

(Version: FME Forms 2024.1.0 WIN64)

Hi ​@kalbert ,

I similarly use parallel pathways like you propose.  1st pathway to get geometries only without Attribution:

AttributeKeeper to just keep the Group By ID → Dissolver  → Aggregator to get the geometry with “Drop Attributes” rather than “Use Attributes From One Feature”

 

Separate, parallel pathway is to get the single feature out of the group to want the Attributes for, which may be some sort of Sorter->DuplicateFilter (or other) pathway, and join the Dissolved+Aggregated Geometries in the first path, with the Attribute path through FeatureJoiner.


So, my view is what you have designed is not at all “ugly” or “dumb”​​.  You actually have what sounds like close to an optimum design! 😉   Many of my workflows will split into separate streams that manipulate the geometry only, and drop the attributes to an absolute minimum, which is much more computationally/memory efficient than having to keep carrying forward Attributes that are not needed for these spatial Transformers but having them keep writing these unneeded Attributes out into computer memory on the Output ports. I will have a separate stream that modifies the Attributes only and drops the geometry from the features (which similarly stops FME having to write out into memory all the geometry data for each Attribute modifying Transformer output port), which all then gets joined back into the final Manipulated Geometries + Manipulated Attributes with a FeatureJoiner.

It is also easier to work with in redesign/refactoring by splitting the workflow paths like this and using FeatureJoiners to get the final product at the end.


Hi @bwn I agree with your statements. However, the real optimum in my opinion would be the option to select “Use attribute from first feature - drop all others”. 

May be a topic for the Ideas Board.

Thanks for describing your approach. 


I agree with bwn. Right now such a workflow is the only way to ensure the correct attributes on the dissolved geometries. I think your idea for a possible selection of which feature to use for the attributes is really useful - you’d have my vote. I think even transformers such as the Aggregator could benefit from that possibility.


Reply