Search Results for

    Show / Hide Table of Contents

    Class RelateNG

    Computes the value of topological predicates between two geometries based on the Dimensionally - Extended 9-Intersection Model(DE-9IM). Standard and custom topological predicates are provided by RelatePredicate.

    The RelateNG algorithm has the following capabilities:
    1. Efficient short-circuited evaluation of topological predicates (including matching custom DE-9IM matrix patterns)
    2. Optimized repeated evaluation of predicates against a single geometry via cached spatial indexes (AKA "prepared mode")
    3. Robust computation (only point-local topology is required, so invalid geometry topology does not cause failures)
    4. GeometryCollection inputs containing mixed types and overlapping polygons are supported, using union semantics.
    5. Zero - length LineStrings are treated as being topologically identical to Points.
    6. Support for IBoundaryNodeRules.

    See IntersectionMatrixPattern for a description of DE - 9IM patterns.

    If not specified, the standard BoundaryNodeRules.Mod2BoundaryNodeRule is used. RelateNG operates in 2D only; it ignores any Z ordinates.

    This implementation replaces RelateOp and IPreparedGeometry.

    FUTURE WORK

    • Support for a distance tolerance to provide "approximate" predicate evaluation
    Inheritance
    object
    RelateNG
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Operation.RelateNG
    Assembly: NetTopologySuite.dll
    Syntax
    public class RelateNG

    Methods

    | Edit this page View Source

    Evaluate(Geometry)

    Computes the DE-9IM matrix for the topological relationship to a geometry.

    Declaration
    public IntersectionMatrix Evaluate(Geometry b)
    Parameters
    Type Name Description
    Geometry b

    The B geometry

    Returns
    Type Description
    IntersectionMatrix

    the DE-9IM matrix

    | Edit this page View Source

    Evaluate(Geometry, TopologyPredicate)

    Tests whether the topological relationship to a geometry satisfies a topology predicate.

    Declaration
    public bool Evaluate(Geometry b, TopologyPredicate predicate)
    Parameters
    Type Name Description
    Geometry b

    The B geometry

    TopologyPredicate predicate

    The topological predicate

    Returns
    Type Description
    bool

    true if the predicate is satisfied

    | Edit this page View Source

    Evaluate(Geometry, string)

    Tests whether the topological relationship to a geometry matches a DE-9IM matrix pattern.

    Declaration
    public bool Evaluate(Geometry b, string imPattern)
    Parameters
    Type Name Description
    Geometry b

    The B geometry

    string imPattern
    Returns
    Type Description
    bool

    true if the geometry's topological relationship matches the DE-9IM pattern

    See Also
    IntersectionMatrixPattern
    | Edit this page View Source

    Prepare(Geometry)

    Creates a prepared RelateNG instance to optimize the evaluation of relationships against a single geometry.

    Declaration
    public static RelateNG Prepare(Geometry a)
    Parameters
    Type Name Description
    Geometry a

    The A input geometry

    Returns
    Type Description
    RelateNG

    A prepared instance

    | Edit this page View Source

    Prepare(Geometry, IBoundaryNodeRule)

    Creates a prepared RelateNG instance to optimize the computation of predicates against a single geometry, using a given IBoundaryNodeRule.

    Declaration
    public static RelateNG Prepare(Geometry a, IBoundaryNodeRule bnRule)
    Parameters
    Type Name Description
    Geometry a

    The A input geometry

    IBoundaryNodeRule bnRule

    The Boundary Node Rule to use

    Returns
    Type Description
    RelateNG

    A prepared instance

    | Edit this page View Source

    Relate(Geometry, Geometry)

    Computes the DE-9IM matrix for the topological relationship between two geometries.

    Declaration
    public static IntersectionMatrix Relate(Geometry a, Geometry b)
    Parameters
    Type Name Description
    Geometry a

    The A input geometry

    Geometry b

    The B input geometry

    Returns
    Type Description
    IntersectionMatrix

    The DE-9IM matrix for the topological relationship

    | Edit this page View Source

    Relate(Geometry, Geometry, IBoundaryNodeRule)

    Computes the DE-9IM matrix for the topological relationship between two geometries.

    Declaration
    public static IntersectionMatrix Relate(Geometry a, Geometry b, IBoundaryNodeRule bnRule)
    Parameters
    Type Name Description
    Geometry a

    The A input geometry

    Geometry b

    The B input geometry

    IBoundaryNodeRule bnRule

    The Boundary Node Rule to use

    Returns
    Type Description
    IntersectionMatrix

    The DE-9IM matrix for the topological relationship

    | Edit this page View Source

    Relate(Geometry, Geometry, TopologyPredicate)

    Tests whether the topological relationship between two geometries satisfies a topological predicate.

    Declaration
    public static bool Relate(Geometry a, Geometry b, TopologyPredicate pred)
    Parameters
    Type Name Description
    Geometry a

    The A input geometry

    Geometry b

    The B input geometry

    TopologyPredicate pred

    The topological predicate

    Returns
    Type Description
    bool

    true if the topological relationship is satisfied

    | Edit this page View Source

    Relate(Geometry, Geometry, TopologyPredicate, IBoundaryNodeRule)

    Tests whether the topological relationship between two geometries satisfies a topological predicate, using a given IBoundaryNodeRule.

    Declaration
    public static bool Relate(Geometry a, Geometry b, TopologyPredicate pred, IBoundaryNodeRule bnRule)
    Parameters
    Type Name Description
    Geometry a

    The A input geometry

    Geometry b

    The B input geometry

    TopologyPredicate pred

    The topological predicate

    IBoundaryNodeRule bnRule

    The Boundary Node Rule to use

    Returns
    Type Description
    bool

    true if the topological relationship is satisfied

    | Edit this page View Source

    Relate(Geometry, Geometry, string)

    Tests whether the topological relationship to a geometry matches a DE-9IM matrix pattern.

    Declaration
    public static bool Relate(Geometry a, Geometry b, string imPattern)
    Parameters
    Type Name Description
    Geometry a

    The A input geometry

    Geometry b

    The B input geometry

    string imPattern

    The DE-9IM pattern to match

    Returns
    Type Description
    bool

    true if the geometries relationship matches the DE-9IM pattern

    See Also
    IntersectionMatrixPattern

    See Also

    RelateOp
    IPreparedGeometry
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX