Class TopologyPredicate
The API for strategy classes implementing spatial predicates based on the DE-9IM topology model. Predicate values for specific geometry pairs can be evaluated by RelateNG.
Inherited Members
Namespace: NetTopologySuite.Operation.RelateNG
Assembly: NetTopologySuite.dll
Syntax
public abstract class TopologyPredicate
Constructors
| Edit this page View SourceTopologyPredicate(string)
Creates an instance of this class
Declaration
protected TopologyPredicate(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the predicate |
Properties
| Edit this page View SourceIsKnown
Tests if the predicate value is known.
Declaration
public abstract bool IsKnown { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Name
Gets the name of the predicate
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Value
Gets the current value of the predicate result.
The value is only valid if IsKnown is true.
Declaration
public abstract bool Value { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceFinish()
Indicates that the value of the predicate can be finalized based on its current state.
Declaration
public abstract void Finish()
Init(Dimension, Dimension)
Initializes the predicate for a specific geometric case. This may allow the predicate result to become known if it can be inferred from the dimensions.
Declaration
public virtual void Init(Dimension dimA, Dimension dimB)
Parameters
| Type | Name | Description |
|---|---|---|
| Dimension | dimA | The dimension of geometry A |
| Dimension | dimB | The dimension of geometry B |
See Also
| Edit this page View SourceInit(Envelope, Envelope)
Initializes the predicate for a specific geometric case. This may allow the predicate result to become known if it can be inferred from the envelopes.
Declaration
public virtual void Init(Envelope envA, Envelope envB)
Parameters
| Type | Name | Description |
|---|---|---|
| Envelope | envA | The envelope of geometry A |
| Envelope | envB | The envelope of geometry B |
RequireCovers(bool)
Reports whether this predicate requires that the source cover the target. This is the case if
IM[Ext(Src), Int(Tgt)] = F and IM[Ext(Src), Bdy(Tgt)] = F
If true, this allows a fast result if
the source envelope does not cover the target envelope.
Declaration
public virtual bool RequireCovers(bool isSourceA)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isSourceA | A flag indicating the source input geometry |
Returns
| Type | Description |
|---|---|
| bool |
|
RequireExteriorCheck(bool)
Reports whether this predicate requires checking if the source input intersects the Exterior of the target input. This is the case if:
IM[Int(Src), Ext(Tgt)] >= 0 or IM[Bdy(Src), Ext(Tgt)] >= 0
If false, this may permit a faster result in some geometric situations.
Declaration
public virtual bool RequireExteriorCheck(bool isSourceA)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isSourceA | A flag indicating the source input geometry |
Returns
| Type | Description |
|---|---|
| bool |
|
RequireInteraction()
Reports whether this predicate requires interaction between the input geometries. This is the case if
IM[I, I] >= 0 or IM[I, B] >= 0 or IM[B, I] >= 0 or IM[B, B] >= 0
This allows a fast result if the envelopes of the geometries are disjoint.
Declaration
public virtual bool RequireInteraction()
Returns
| Type | Description |
|---|---|
| bool |
|
RequireSelfNoding()
Reports whether this predicate requires self-noding for geometries which contain crossing edges (for example, LineStrings, or GeometryCollections containing lines or polygons which may self-intersect). Self-noding ensures that intersections are computed consistently in cases which contain self-crossings and mutual crossings.
Most predicates require this, but it can be avoided for simple intersection detection (such as in Intersects() and Disjoint(). Avoiding self-noding improves performance for polygonal inputs.Declaration
public virtual bool RequireSelfNoding()
Returns
| Type | Description |
|---|---|
| bool |
UpdateDimension(Location, Location, Dimension)
Updates the entry in the DE-9IM intersection matrix for given {@link Location}s in the input geometries.
If this method is called with a {@link Dimension} value which is less than the current value for the matrix entry, the implementing class should avoid changing the entry if this would cause information loss.Declaration
public abstract void UpdateDimension(Location locA, Location locB, Dimension dimension)
Parameters
| Type | Name | Description |
|---|---|---|
| Location | locA | The location on the A axis of the matrix |
| Location | locB | The location on the B axis of the matrix |
| Dimension | dimension | The dimension value for the entry |