Skip to main content
Solved

How to aggregate a matrix of attribute values into a single row

  • November 6, 2015
  • 3 replies
  • 27 views

Forum|alt.badge.img
How to aggregate a matrix of attribute values into a single row

Best answer by takashi

Hi,

 

 

Try this.

 

  1. Create a new attribute which stores the non-null value stored by one of "TextVal", "NumVal", or "EntityVal". You can just concatenate the three attribute values since only one of them is filled per row, and set the value of "Property" to the new attribute name. The AttributeCreator can be used to do this.
  2. Aggregate the features with the Aggregator (Group By: Object-ID, Keep Input Attributes: Yes).
  3. Expose the possible "Property" values (255, 256, ... i.e. the attribute names for the resulting table) with the AttributeExposer.
  4. Optionally remove unnecessary attributes with the AttributeRemover.
AttributeCreator parameters:

 

 

 

Result:

 

 

 

Takashi
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • Best Answer
  • November 6, 2015
Hi,

 

 

Try this.

 

  1. Create a new attribute which stores the non-null value stored by one of "TextVal", "NumVal", or "EntityVal". You can just concatenate the three attribute values since only one of them is filled per row, and set the value of "Property" to the new attribute name. The AttributeCreator can be used to do this.
  2. Aggregate the features with the Aggregator (Group By: Object-ID, Keep Input Attributes: Yes).
  3. Expose the possible "Property" values (255, 256, ... i.e. the attribute names for the resulting table) with the AttributeExposer.
  4. Optionally remove unnecessary attributes with the AttributeRemover.
AttributeCreator parameters:

 

 

 

Result:

 

 

 

Takashi

Forum|alt.badge.img
  • Author
  • November 7, 2015
Hi,

 

 

Try this.

 

  1. Create a new attribute which stores the non-null value stored by one of "TextVal", "NumVal", or "EntityVal". You can just concatenate the three attribute values since only one of them is filled per row, and set the value of "Property" to the new attribute name. The AttributeCreator can be used to do this.
  2. Aggregate the features with the Aggregator (Group By: Object-ID, Keep Input Attributes: Yes).
  3. Expose the possible "Property" values (255, 256, ... i.e. the attribute names for the resulting table) with the AttributeExposer.
  4. Optionally remove unnecessary attributes with the AttributeRemover.
AttributeCreator parameters:

 

 

 

Result:

 

 

 

Takashi
Hi Takashi, sorry I forgot to post my name, it's Annika...that is awesome and exactly what I need, you saved the weekend, thanks a lot!

 

Annika

 


Forum|alt.badge.img
  • Author
  • November 7, 2015
Hi Takashi, sorry, forgot to post my name, it's Annika...that is awesome and exactly what I need. You saved the weekend, thanks a lot! Annika