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.
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.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.