Skip to main content
Solved

Getting the match_id in the "Matcher" transformer to start counting at a specified number


fmenco
Contributor
Forum|alt.badge.img+5

Hi,

I have two datasets of line features which I want to check individually for duplicate line features. However, the output containing the duplicate line features of both datasets should be combined in one dataset. I used a Matcher transformer on each dataset. When combining the output I of course get similar match_ids for features, that aren't always matches of each other. How do I adapt my workbench to avoid this?

Is there a way to set the match_id attribute of one of the Matcher transformers to start counting at a specified number?

I also can't send both datasets to the same transformer, because for my datasets that would result in unwanted matches.

 

a simplied version of the workbench

And a simplified version of the generated output

 

Best answer by david_r

How about adding an ExpressionEvaluator after one of the Matchers and add a large number, such as e.g. one million, to the _match_id. That way you'll end up with two separate number series, one for each Matcher.

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

4 replies

david_r
Evangelist
  • Best Answer
  • December 10, 2018

How about adding an ExpressionEvaluator after one of the Matchers and add a large number, such as e.g. one million, to the _match_id. That way you'll end up with two separate number series, one for each Matcher.


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • December 10, 2018

If you don't want to match between datasets, you could just use the fme_feature_type/fme_basename (depending on input format) as one of the match attributes


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • December 10, 2018

As @egomm suggested, I think you can accomplish that by sending all features from the two source feature types into a single Matcher and setting "fme_feature_type" or "fme_basename" to the Selected Attributes parameter.

However, if you have to use two Matchers for each feature type separately for some reason, a possible way is: calculate the maximum match_id on one feature type, merge it to every feature from another feature type, and add (the max value + 1) to their match_id. The workflow would look like this.


fmenco
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • December 12, 2018

Hi all, thanks ! I applied david_r's approach, and the output firts what I want. I'm also going to try the other approaches.


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