Skip to main content
Question

FME Desktop 2022: How to dissolve based on a particular field and then to get the COUNT of the dissolved features as well as the FIRST value of other field?

  • February 25, 2022
  • 3 replies
  • 462 views

jamal
Forum|alt.badge.img+5

FME Desktop 2022: How to dissolve based on a particular field and then to get the COUNT of the dissolved features as well as the FIRST value of other field?

 

For example, in the screenshot below, I wanted to dissolve based on the “autocad_color” field and then to COUNT the features that have been dissolved while taking the FIRST value of the “landuse_arabic” field.

 

This can be done easily in Pro with one command (dissolve)

 

The data is attached

Clip_91 

Clip_92 

 

 

 

 

 

 

 

 

 

The data is attached

3 replies

DanAtSafe
Safer
Forum|alt.badge.img+17
  • Safer
  • February 27, 2022

Hi @jamal The Dissolver has a parameter called Dissolve Count where you can set an attribute name to receive the count of polygons dissolved together. By default, values kept by the new dissolved polygons will be from the FIRST polygon from the set - just as in Pro.


hkingsbury
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • February 27, 2022
DanAtSafe wrote:

Hi @jamal The Dissolver has a parameter called Dissolve Count where you can set an attribute name to receive the count of polygons dissolved together. By default, values kept by the new dissolved polygons will be from the FIRST polygon from the set - just as in Pro.

Agree with @danatsafe​, an alternate method that in some scenarios may be the desired outcome is to generate a list on the output feature, then you can count the length of the list (ListElementCounter) and then use the ListIndexer to copy the index of the list which contains the attributes you want.

 

This of course can potentially leave you with a very large list so it would be a good idea to follow it up with a AttributeRemover to remove the list


jamal
Forum|alt.badge.img+5
  • Author
  • March 8, 2022

Thank you for the help

 

1) It works for the count

2) As for the statistics, it appears that there is no chance to apply it for all fields

3) Is there any chance to concatinate all fields in one go?

 

Clip_201 

Clip_202 

Clip_203 

 

 

 

 

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings