Class ChainMatcher

  extended bycom.vividsolutions.jcs.conflate.polygonmatch.ChainMatcher
All Implemented Interfaces:

public class ChainMatcher
extends java.lang.Object
implements FeatureMatcher

Composes several FeatureMatchers into one. Candidate features are whittled down by applying each FeatureMatcher.

Note: Only the last FeatureMatcher's scores are preserved; the other scores are lost. However, this behaviour should be acceptable for most situations Typically you use the Chained Matcher to do some initial filtering before the "real" matching. The scores from this initial filtering are usually ignored (they're usually just 1 or 0, as in the case of WindowFilter).

Constructor Summary
ChainMatcher(FeatureMatcher[] matchers)
          Creates a ChainMatcher composed of the given matchers.
Method Summary
 Matches match(com.vividsolutions.jump.feature.Feature target, com.vividsolutions.jump.feature.FeatureCollection candidates)
          Applies the FeatureMatchers, in sequence, to the list of candidates.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ChainMatcher(FeatureMatcher[] matchers)
Creates a ChainMatcher composed of the given matchers.

matchers - the matchers to link together
Method Detail


public Matches match(com.vividsolutions.jump.feature.Feature target,
                     com.vividsolutions.jump.feature.FeatureCollection candidates)
Applies the FeatureMatchers, in sequence, to the list of candidates.

Specified by:
match in interface FeatureMatcher
target - the feature to match
candidates - the features to search for matches
the candidates surviving all the FeatureMatchers. The scores are those returned by the last FeatureMatcher.