Skip to main content
Hi all,

 

 

I want to use the custom transformer FromToBuilder to connect all From points to all To points. I thought that by setting a common attribute for joining features where the value is set to 1 for all features would produce this M:M result. However, I've only managed to get lines from all From features to ONE To feature, in other words M:1.

 

 

Any ideas how to achive M:M?

 

Hi Daniel,

 

 

Thats a full cartesian product FROMxTO.

 

U can achieve this by first, indeed merging using a common attribute.

 

 

First extract coordinates of points and name them apporpriatly.

 

Use a featuremerger, set proces duplicates and enter a listname.

 

On the output insert an listexploder and explode the duplicatelist. Now u will have the cartesian product.

 

 

If u have passed the x,y coordinates. U can now use 2DReplacer on the FROM points and a 2DPointadder on the TO points.

 

 

Thats all.

 

(i made a workbecnh while typing this, so if u want it, just holler :))

 

Have funs,

 

Gio
Hi Gio,

 

 

Thanks for sharing your solution idea, it seems to work fine for me!

 

Regards, 

 

Daniel
Hi Daniel,

 

 

I had a look at definition of the FromToBuilder. You can customize it easily for your requirement.

 

1) Open editing window for the FromToBuilder (right-click on the transformer interface and select Edit on the context menu).

 

2) In the parameters dialog of the FeatureMerger, enter a list attribute name (e.g. "_list") to "List Name". And make sure that "Process Duplicate Suppliers" is "Yes".

 

3) Insert a ListExploder after the FeatureMerger. Specify the list attribute to "List Attribute" parameter.

 

After customizing, the workflow becomes almost same as Gio's suggestion.

 

 

Takashi

Reply