Skip to main content
Question

Removing the whole group from specific values

  • November 19, 2018
  • 3 replies
  • 11 views

parashari
Forum|alt.badge.img+2
ColA

 

ColB

 

2

 

a

 

3

 

a

 

3

 

a

 

2

 

b

 

1

 

b

 

4

 

b

 

3

 

c

 

4

 

c

 

 

I have this above input where I would like to delete the whole group (a, b, c) from ColB, if there is a '2' in ColA in the specified group.

For example, if there is a 2 in ColA, the whole group 'a' is removed from ColB (and not just the specified row).

3 replies

takashi
Influencer
  • November 19, 2018

A possible way is: use the Aggregator to aggregate the features grouping by ColB and also create a list attribute storing ColA values, find '2' in the list with the ListSearcher, and restore the original features from only the NotFound features with the ListExploder.


parashari
Forum|alt.badge.img+2
  • Author
  • November 20, 2018
takashi wrote:

A possible way is: use the Aggregator to aggregate the features grouping by ColB and also create a list attribute storing ColA values, find '2' in the list with the ListSearcher, and restore the original features from only the NotFound features with the ListExploder.

Hi @takashi. Maybe, I had put the statement in a partial way. I'll explain it a bit.

I have roads like shown below.

There are groups of roads that I have selected using SQLCreator from the server. Now, I have to find the specific group(like Colb(above), so all the road segments have a common group name) of roads(for which you told the above solution). And after that, I need to find how many roads are just one way and calculating their percentage(info not displayed here).

So, if I aggregate the values like above mentioned, calculating percentage would be a bit of task.

Also, I tried reading about creating list attribute transformers, but couldn't get much.

Thanks.


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • November 20, 2018

You could use this sort of flow, test for value of 2, then use any features that pass as suppliers in a featuremerger. If you keep only unmerged features that 'discards' the whole group


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