Search Results for

    Show / Hide Table of Contents

    Class IsSimpleOp

    Tests whether a Geometry is simple. In general, the SFS specification of simplicity follows the rule:

    • A Geometry is simple if and only if the only self-intersections are at boundary points.
    Inheritance
    object
    IsSimpleOp
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Operation
    Assembly: NetTopologySuite.dll
    Syntax
    [Obsolete("Replaced by NetTopologySuite.Operation.Valid.IsSimpleOp")]
    public class IsSimpleOp
    Remarks

    Simplicity is defined for each Geometry} subclass as follows:

    • Valid IPolygonal geometries are simple by definition, so IsSimple trivially returns true.
      (Note: this means that IsSimple cannot be used to test for (invalid) self-intersections in Polygons. In order to check if a Polygonal geometry has self-intersections, use IsValid).
    • ILineal geometries are simple if and only if they do not self-intersect at interior points (i.e. points other than boundary points). This is equivalent to saying that no two linear components satisfy the SFS Touches(Geometry) predicate.
    • Zero-dimensional (IPuntal) geometries are simple if and only if they have no repeated points.
    • Empty Geometrys are always simple by definition.
    For ILineal geometries the evaluation of simplicity can be customized by supplying a IBoundaryNodeRule to define how boundary points are determined. The default is the SFS-standard BoundaryNodeRules.Mod2BoundaryNodeRule. Note that under the Mod-2 rule, closed LineStrings (rings) will never satisfy the touches predicate at their endpoints, since these are interior points, not boundary points. If it is required to test whether a set of LineStrings touch only at their endpoints, use IsSimpleOp with EndpointBoundaryRule. For example, this can be used to validate that a set of lines form a topologically valid linear network.

    Constructors

    | Edit this page View Source

    IsSimpleOp(Geometry)

    Creates a simplicity checker using the default SFS Mod-2 Boundary Node Rule

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

    The geometry to test

    | Edit this page View Source

    IsSimpleOp(Geometry, IBoundaryNodeRule)

    Creates a simplicity checker using a given IBoundaryNodeRule

    Declaration
    public IsSimpleOp(Geometry geom, IBoundaryNodeRule boundaryNodeRule)
    Parameters
    Type Name Description
    Geometry geom

    The geometry to test

    IBoundaryNodeRule boundaryNodeRule

    The rule to use

    Properties

    | Edit this page View Source

    NonSimpleLocation

    Gets a coordinate for the location where the geometry fails to be simple. (i.e. where it has a non-boundary self-intersection). IsSimple() must be called before this location is accessed

    Declaration
    public Coordinate NonSimpleLocation { get; }
    Property Value
    Type Description
    Coordinate

    a coordinate for the location of the non-boundary self-intersection or null if the geometry is simple

    Methods

    | Edit this page View Source

    IsSimple()

    Tests whether the geometry is simple.

    Declaration
    public bool IsSimple()
    Returns
    Type Description
    bool

    true if the geometry is simple

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