Question

Filtering multiple geometry from one source based on a singular ID (one to many relationship)


Dear community,

 

I've been scratching my head for a while and I know the solution should be a simple one but I can't seem to figure it out.

 

I have one source containing a lot of geometry. Each ID can have multiple polygon records. I have a list of specific IDs that I want to filter out. However the feature merger will only take the first record and leave out any 'duplicate'.

 

Short example:

 

Project|Geometry|

Ab1|1

Ab1|2|

Ac3|1|

Ac3|2|

Ac3|3|

Ak1|1|

Ak1|2|

 

Desired result: Ac3 & Ak1

Ac3|1|

Ac3|2|

Ac3|3|

Ak1|1|

Ak1|2|

 

Is there an easy way to do this?

 


2 replies

Userlevel 5
Badge +29

A few way to do this.... One way is on the branch containing your geom use the Aggregator with the Group By set to the ID field(s). This will aggregate you geom into one multipart geometry. Then you can pass it through the FeatureMerger and it should be a 1:1 join. Then after the feature merger, you can use the deaggregator to split you geom back out

Userlevel 5
Badge +29

A few way to do this.... One way is on the branch containing your geom use the Aggregator with the Group By set to the ID field(s). This will aggregate you geom into one multipart geometry. Then you can pass it through the FeatureMerger and it should be a 1:1 join. Then after the feature merger, you can use the deaggregator to split you geom back out

As soon as I posted that I realised you probably have the geom coming through the Supplier port? place the geom on the requestor and the other data on the supplier

Reply