Solved

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

  • 10 December 2018
  • 4 replies
  • 1 view

Badge

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

 

icon

Best answer by david_r 10 December 2018, 11:32

View original

4 replies

Userlevel 4

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.

Userlevel 1
Badge +10

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

Userlevel 2
Badge +17

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.

Badge

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.

Reply