Skip to main content

Hi there, 

 

I have a shapefile with real estates that enclose several buildings. I want each polygon in the real estate layer to inherit the attribute entries for the buildings that lie inside each real estate polygon. Some of these entries will be the same, but I want all unique entries for buildings within the same polygon to be written to the same entry. 

 

For example. Three buildings lie within one real estate with attribute entries “Residence” “Grocery store” and “Recidence”. I want these attributes entries to be concatenated into a single attribute entry, separated with comma, in the real estate layer, but with duplicate entries removed. So, the final attribute entry should be “Resicence, Grocery store” for the real estate polygon. Is there any way to achieve this in FME?

Yes, you can use a SpatialRelator to handle this. The Real Estates polys should be Requestors, the buildings should be Suppliers and the spatial predicate is Contains.

If you specify to create a list in the Attribute Accumulation part of the parameters you’ll get a list of all building attributes that fall within a real estate polygon. So then a ListDuplicateRemover to remove duplicate entires and a ListConcatenator to put it all in a single, comma-separated, attribute


Thank you ​@redgeographics, that worked perfectly! 


You’re welcome! 😃


Reply