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
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.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
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.
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.
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
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.