Skip to main content
Question

Merge attributes from mulitple features onto new object


aron
Supporter
Forum|alt.badge.img+16
  • Supporter

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?

 

6 replies

takashi
Evangelist
  • 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
  • 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
Supporter
Forum|alt.badge.img+16
  • Author
  • Supporter
  • 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
  • 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
Evangelist
  • January 24, 2020
aron wrote:

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
Supporter
Forum|alt.badge.img+16
  • Author
  • Supporter
  • January 28, 2020
bwn wrote:

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.


Reply


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