Search Results for

    Show / Hide Table of Contents

    Class BasicPreparedGeometry

    A base class for IPreparedGeometry subclasses.

    Inheritance
    object
    BasicPreparedGeometry
    PreparedLineString
    PreparedPoint
    PreparedPolygon
    Implements
    IPreparedGeometry
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: NetTopologySuite.Geometries.Prepared
    Assembly: NetTopologySuite.dll
    Syntax
    public class BasicPreparedGeometry : IPreparedGeometry
    Remarks

    Contains default implementations for methods, which simply delegate to the equivalent Geometry methods.

    This class may be used as a "no-op" class for Geometry types which do not have a corresponding IPreparedGeometry implementation.

    Constructors

    | Edit this page View Source

    BasicPreparedGeometry(Geometry)

    Declaration
    public BasicPreparedGeometry(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    Properties

    | Edit this page View Source

    Geometry

    Gets the original Geometry which has been prepared.

    Declaration
    public Geometry Geometry { get; }
    Property Value
    Type Description
    Geometry
    | Edit this page View Source

    RepresentativePoints

    Gets the list of representative points for this geometry. One vertex is included for every component of the geometry (i.e. including one for every ring of polygonal geometries).

    Do not modify the returned list!
    Declaration
    public IList<Coordinate> RepresentativePoints { get; }
    Property Value
    Type Description
    IList<Coordinate>

    Methods

    | Edit this page View Source

    Contains(Geometry)

    Tests whether the base Geometry contains a given geometry.

    Declaration
    public virtual bool Contains(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    The Geometry to test

    Returns
    Type Description
    bool

    true if this Geometry contains the given Geometry

    Remarks

    Default implementation.

    | Edit this page View Source

    ContainsProperly(Geometry)

    Tests whether the base Geometry properly contains a given geometry.

    The ContainsProperly predicate has the following equivalent definitions:

    In other words, if the test geometry has any interaction with the boundary of the target geometry the result of ContainsProperly is false. This is different semantics to the Contains(Geometry) predicate, in which test geometries can intersect the target's boundary and still be contained.

    The advantage of using this predicate is that it can be computed efficiently, since it avoids the need to compute the full topological relationship of the input boundaries in cases where they intersect.

    An example use case 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(Geometry) to filter out test geometries which lie wholly inside the area. In these cases the intersection is known a priori to be simply the original test geometry.
    Declaration
    public virtual bool ContainsProperly(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry properly contains the given geometry

    Remarks

    Default implementation.

    See Also
    Contains(Geometry)
    | Edit this page View Source

    CoveredBy(Geometry)

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

    Declaration
    public virtual bool CoveredBy(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry is covered by the given geometry

    Remarks

    Default implementation.

    | Edit this page View Source

    Covers(Geometry)

    Tests whether the base Geometry covers a given geometry.

    Declaration
    public virtual bool Covers(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry covers the given geometry

    Remarks

    Default implementation.

    | Edit this page View Source

    Crosses(Geometry)

    Tests whether the base Geometry crosses a given geometry.

    Declaration
    public virtual bool Crosses(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry crosses the given geometry

    Remarks

    Default implementation.

    | Edit this page View Source

    Disjoint(Geometry)

    Tests whether the base Geometry is disjoint from given geometry.

    Declaration
    public bool Disjoint(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry is disjoint from the given geometry

    Remarks

    Standard implementation for all geometries.

    | Edit this page View Source

    EnvelopeCovers(Geometry)

    Determines whether the envelope of this geometry covers the Geometry g.

    Declaration
    protected bool EnvelopeCovers(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    A geometry

    Returns
    Type Description
    bool

    true if g is contained in this envelope

    | Edit this page View Source

    EnvelopesIntersect(Geometry)

    Determines whether a Geometry g interacts with this geometry by testing the geometry envelopes.

    Declaration
    protected bool EnvelopesIntersect(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    A geometry

    Returns
    Type Description
    bool

    true if the envelopes intersect

    | Edit this page View Source

    Intersects(Geometry)

    Tests whether the base Geometry intersects a given geometry.

    Declaration
    public virtual bool Intersects(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry intersects the given geometry

    Remarks

    Default implementation.

    | Edit this page View Source

    IsAnyTargetComponentInTest(Geometry)

    Tests whether any representative of the target geometry intersects the test geometry. This is useful in A/A, A/L, A/P, L/P, and P/P cases.

    Declaration
    public bool IsAnyTargetComponentInTest(Geometry testGeom)
    Parameters
    Type Name Description
    Geometry testGeom

    The test geometry

    Returns
    Type Description
    bool

    true if any component intersects the areal test geometry

    | Edit this page View Source

    Overlaps(Geometry)

    Tests whether the base Geometry overlaps a given geometry.

    Declaration
    public virtual bool Overlaps(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry overlaps the given geometry

    Remarks

    Default implementation.

    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()
    | Edit this page View Source

    Touches(Geometry)

    Tests whether the base Geometry touches a given geometry.

    Declaration
    public virtual bool Touches(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry touches the given geometry

    Remarks

    Default implementation.

    | Edit this page View Source

    Within(Geometry)

    Tests whether the base Geometry is within a given geometry.

    Declaration
    public virtual bool Within(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    The geometry to test

    Returns
    Type Description
    bool

    true if this geometry is within the given geometry

    Remarks

    Default implementation.

    Implements

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