Skip to main content
Question

Merge attributes from mulitple features onto new object

  • January 23, 2020
  • 6 replies
  • 145 views

aron
Enthusiast
Forum|alt.badge.img+16
  • Enthusiast
  • 136 replies

I am using SpatialRelator to merge attributes from intersecting features B, C, D etc onto feature A. The number of supliers varies from 1 and upwards 4-5. My problem is that the transformer only seems to read the first intersecting suplier that enters, and then moves on.

Any ideas on how to solve this and merge the attributes from all incoming features?

 

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.

6 replies

takashi
Celebrity
  • 7843 replies
  • January 23, 2020

Hi @aron, you can generate a list attribute that will store attributes in every Supplier feature related to the Requestor spatially. Check the Generate List checkbox and select attributes you need to collect from Suppliers.


Forum|alt.badge.img+2
  • 1891 replies
  • January 23, 2020

@aron If the attribute names on the Supplier features are the same, then it will appear that only one feature was found. Instead or Merge Attributes, try Generate List.


aron
Enthusiast
Forum|alt.badge.img+16
  • Author
  • Enthusiast
  • 136 replies
  • January 24, 2020

Thanks @mark2atsafe and @takashi!

Unfortunately I can't get this working the way I want. When I run the list through a ListExploder I end up with overlying features. All the information is now output, but not in one single feature. And the whole point of this exercise was to combine the attributes from multiple overlying features into one.

My original workspace worked fine as long as there where only two overlying features. It is when I tried adding more than two I ran into trouble.


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • 562 replies
  • January 24, 2020

There a lot of different ways to do this, but using the workflow you've got this may be simplest:  Assuming there is only ever one value of B overlaying A, and only every one possible value of C overlaying A etc. etc.

So the problem would seem to be that your result looks like this, Feature A will have a List of B, C, D and E's values like this:

BValue, Missing, Missing, Missing
Missing, CValue, Missing,Missing
Missing, Missing, DValue, Missing
Missing, Missing, Missing, EValue

Without reworking the existing workflow too heavily, then the SpatialRelator output could instead be directed to 4 sequential ListRangeExtractors.  Each of these will create a new Attribute for the "Max" value of each of the 4 List Attributes, leaving a single feature with the Maximum value extracted from each ListAttribute.


takashi
Celebrity
  • 7843 replies
  • January 24, 2020

Thanks @mark2atsafe and @takashi!

Unfortunately I can't get this working the way I want. When I run the list through a ListExploder I end up with overlying features. All the information is now output, but not in one single feature. And the whole point of this exercise was to combine the attributes from multiple overlying features into one.

My original workspace worked fine as long as there where only two overlying features. It is when I tried adding more than two I ran into trouble.

For instance, assuming that every Supplier feature has an attribute called "attr" and three Suppliers have 1, 2, 3 in "attr", then if a Requestor intersects all the three Suppliers, what result you need?


aron
Enthusiast
Forum|alt.badge.img+16
  • Author
  • Enthusiast
  • 136 replies
  • January 28, 2020

There a lot of different ways to do this, but using the workflow you've got this may be simplest:  Assuming there is only ever one value of B overlaying A, and only every one possible value of C overlaying A etc. etc.

So the problem would seem to be that your result looks like this, Feature A will have a List of B, C, D and E's values like this:

BValue, Missing, Missing, Missing
Missing, CValue, Missing,Missing
Missing, Missing, DValue, Missing
Missing, Missing, Missing, EValue

Without reworking the existing workflow too heavily, then the SpatialRelator output could instead be directed to 4 sequential ListRangeExtractors.  Each of these will create a new Attribute for the "Max" value of each of the 4 List Attributes, leaving a single feature with the Maximum value extracted from each ListAttribute.

For some strange reason I am getting some features where this method does not work. I have no idea why.