Skip to main content

Hi

 

I have a database which has about 80 attributes that I need to add together. Short of manually creating an attribute in Attribute Manager's arithmetic editor, is there another way that can sum there? I thought about creating a list, but that creates a numbered element per feature, not per field like I need.

 

Many thanks

Mark

Assuming this is what you are after, so adding up multiple attributes from the same feature

Capture 

Inefficient way

  • Use AttributeExploder to explode the attribute into features per attribute
  • Get rid of any features that contain an AttributeName you don't want to sum (e.g. format attributes)
  • Aggregate based on some original record id and sum AttributeValues

 

Efficient way

  • Use python

 

Another way

  • If all the attributes you want to sum share a common prefix, you can use a ListPopulator to build a list followed by a ListSummer. You can use a bulk attribute renamer to add the prefix if it doesn't already exist and remove again later

Assuming this is what you are after, so adding up multiple attributes from the same feature

Capture 

Inefficient way

  • Use AttributeExploder to explode the attribute into features per attribute
  • Get rid of any features that contain an AttributeName you don't want to sum (e.g. format attributes)
  • Aggregate based on some original record id and sum AttributeValues

 

Efficient way

  • Use python

 

Another way

  • If all the attributes you want to sum share a common prefix, you can use a ListPopulator to build a list followed by a ListSummer. You can use a bulk attribute renamer to add the prefix if it doesn't already exist and remove again later

Actually the ListPopulator doesn't appear to work correctly with a BulkAttributeRenamer in front of it...


Actually the ListPopulator doesn't appear to work correctly with a BulkAttributeRenamer in front of it...

What about with ListExpressionPopulator instead? I'm sure I've done the same technique like this in a workspace with BulkAttributeRenamer + ListExpressionPopulator?


Reply