Skip to main content
Solved

DuplicateFilter: Hot to choose which of the pair goes to unique depending on the featuretype?


pcarrerabalsell
Contributor
Forum|alt.badge.img+5
Hello, the problem is the following. I have a duplicateFilter attached to 2 different featuresTypes, which have an attribute in common. I would like, however, that when there are duplicates, the features of a certain type remain in the unique port. In other words: when there are duplicates, I always want the pair of the copy that goes to unique to be of a certain feature type, always the same, and to be able to control it. Any ideas? Thanks,

 

Pol

Best answer by redgeographics

pcarrerabalsell wrote:

Well, maybe I didn't express myself well. They are 2 connections to 2 datasets with the same featuretype, they have the same attributes and different values ​​in all except the one (service_id, not always) I compare to the duplicateFilter. Are calendar_dates from GTFS. On one side they all have 0 in the attributes, on the other side they don't. I want, when there are duplicates, that the pair that does not have zeros goes to unique. I hope I expressed myself better, thank you very much!
Pol

 

 

Same thing really: put the set that you want to keep in the FeatureMerger as Requestor. Match on the attribute service_id and then the Matched output is what you’re after. 

View original
Did this help you find an answer to your question?

5 replies

virtualcitymatt
Celebrity
Forum|alt.badge.img+34

The easy way is to just sort the data first, the duplicate filter should keep the fist one as unique.

The alternative option is to use a Matcher - This will let you identify features which match and then you can use a tester to just test for the specific feature type you want. 

 


redgeographics
Celebrity
Forum|alt.badge.img+47

In addition to @virtualcitymatt ‘s suggestion, a FeatureMerger may also be useful. The featuretype you want to keep is the one you put in as Requestor, the other one as Supplier. Then the Matched output is the duplicate features from the featuretype you want to keep.


pcarrerabalsell
Contributor
Forum|alt.badge.img+5

Well, maybe I didn't express myself well. They are 2 connections to 2 datasets with the same featuretype, they have the same attributes and different values ​​in all except the one (service_id, not always) I compare to the duplicateFilter. Are calendar_dates from GTFS. On one side they all have 0 in the attributes, on the other side they don't. I want, when there are duplicates, that the pair that does not have zeros goes to unique. I hope I expressed myself better, thank you very much!
Pol

 

 


redgeographics
Celebrity
Forum|alt.badge.img+47
  • Celebrity
  • Best Answer
  • April 19, 2024
pcarrerabalsell wrote:

Well, maybe I didn't express myself well. They are 2 connections to 2 datasets with the same featuretype, they have the same attributes and different values ​​in all except the one (service_id, not always) I compare to the duplicateFilter. Are calendar_dates from GTFS. On one side they all have 0 in the attributes, on the other side they don't. I want, when there are duplicates, that the pair that does not have zeros goes to unique. I hope I expressed myself better, thank you very much!
Pol

 

 

Same thing really: put the set that you want to keep in the FeatureMerger as Requestor. Match on the attribute service_id and then the Matched output is what you’re after. 


pcarrerabalsell
Contributor
Forum|alt.badge.img+5
thank you very much, it worked! I point out the maneuver, it's good!CheersPol

 


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