Search Results for

    Show / Hide Table of Contents

    Interface IPreparedGeometry

    An interface for classes which prepare Geometrys in order to optimize the performance of repeated calls to specific geometric operations.

    Namespace: NetTopologySuite.Geometries.Prepared
    Assembly: NetTopologySuite.dll
    Syntax
    public interface IPreparedGeometry
    Remarks

    A given implementation may provide optimized implementations for only some of the specified methods, and delegate the remaining methods to the original Geometry operations.

    An implementation may also only optimize certain situations, and delegate others. See the implementing classes for documentation about which methods and situations they optimize.

    Subclasses are intended to be thread-safe, to allow IPreparedGeometry to be used in a multi-threaded context (which allows extracting maximum benefit from the prepared state).

    Properties

    | Edit this page View Source

    Geometry

    Gets the original Geometry which has been prepared.

    Declaration
    Geometry Geometry { get; }
    Property Value
    Type Description
    Geometry

    Methods

    | Edit this page View Source

    Contains(Geometry)

    Tests whether the base Geometry contains a given geometry.

    Declaration
    bool Contains(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The Geometry to test

    Returns
    Type Description
    bool

    true if this Geometry contains the given Geometry

    | Edit this page View Source

    ContainsProperly(Geometry)

    Tests whether the base Geometry contains a given geometry.

    Declaration
    bool ContainsProperly(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry properly contains the given geometry

    Remarks

    The ContainsProperly predicate has the following equivalent definitions:

    • Every point of the other geometry is a point of this geometry's interior.
    • The DE-9IM Intersection Matrix for the two geometries matches >[T**FF*FF*]
    The advantage to using this predicate is that it can be computed efficiently, with no need to compute topology at individual points.

    An example use case for this predicate is computing the intersections of a set of geometries with a large polygonal geometry. Since intersection is a fairly slow operation, it can be more efficient to use containsProperly to filter out test geometries which lie wholly inside the area. In these cases the intersection known a priori to be simply the original test geometry.

    | Edit this page View Source

    CoveredBy(Geometry)

    Tests whether the base Geometry is covered by a given geometry.

    Declaration
    bool CoveredBy(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry is covered by the given geometry

    | Edit this page View Source

    Covers(Geometry)

    Tests whether the base Geometry covers a given geometry.

    Declaration
    bool Covers(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry covers the given geometry

    | Edit this page View Source

    Crosses(Geometry)

    Tests whether the base Geometry crosses a given geometry.

    Declaration
    bool Crosses(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry crosses the given geometry

    | Edit this page View Source

    Disjoint(Geometry)

    Tests whether the base Geometry is disjoint from given geometry.

    Declaration
    bool Disjoint(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry is disjoint from the given geometry

    Remarks

    This method supports GeometryCollections as input

    | Edit this page View Source

    Intersects(Geometry)

    Tests whether the base Geometry intersects a given geometry.

    Declaration
    bool Intersects(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry intersects the given geometry

    Remarks

    This method supports GeometryCollections as input

    | Edit this page View Source

    Overlaps(Geometry)

    Tests whether the base Geometry overlaps a given geometry.

    Declaration
    bool Overlaps(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry overlaps the given geometry

    | Edit this page View Source

    Touches(Geometry)

    Tests whether the base Geometry touches a given geometry.

    Declaration
    bool Touches(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry touches the given geometry

    | Edit this page View Source

    Within(Geometry)

    Tests whether the base Geometry is within a given geometry.

    Declaration
    bool Within(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry is within the given geometry

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