org.geotools.graph.build
Class FeatureRelator

java.lang.Object
  extended byorg.geotools.graph.build.FeatureRelator

public abstract class FeatureRelator
extends java.lang.Object

A FeatureRelator determines the logical relationship between two features.

A FeatureRelator uses a FeatureComparator to determine the kind of relationship present between two Features, and then determines if this relationship should be represented explicitly in thh graph.

Questions for JG:

Note:
If featureRelator provided some kind of metadata on these issues, especially for ones limited to specific Geometry types like LineString, we could have a factory that matched relationship with the most efficient kind of Graph representation.

A good example relationship is touches, it is bidirectional. It is not reflexive. It is not transitive.


Constructor Summary
FeatureRelator(FeatureComparator comparator)
          Creates a new FeatureRelator object.
 
Method Summary
 FeatureComparator getComparator()
          Returns the FeatureComparator used by the relator.
abstract  boolean relate(org.geotools.feature.Feature f1, org.geotools.feature.Feature f2)
          Relates two features.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureRelator

public FeatureRelator(FeatureComparator comparator)
Creates a new FeatureRelator object.

Parameters:
comparator - FeatureComparator
See Also:
FeatureComparator
Method Detail

getComparator

public FeatureComparator getComparator()
Returns the FeatureComparator used by the relator.

Returns:
FeatureComparator
See Also:
FeatureComparator

relate

public abstract boolean relate(org.geotools.feature.Feature f1,
                               org.geotools.feature.Feature f2)
Relates two features.

Returns:
True if there is a relationship present, otherwise false.