Search Results for

    Show / Hide Table of Contents

    Class IsValidOp

    Implements the algorithms required to compute the IsValid method for Geometrys. See the documentation for the various geometry types for a specification of validity.

    Inheritance
    object
    IsValidOp
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Operation.Valid
    Assembly: NetTopologySuite.dll
    Syntax
    public class IsValidOp

    Constructors

    | Edit this page View Source

    IsValidOp(Geometry)

    Creates a new validator for a geometry

    Declaration
    public IsValidOp(Geometry inputGeometry)
    Parameters
    Type Name Description
    Geometry inputGeometry

    The geometry to validate

    Properties

    | Edit this page View Source

    IsSelfTouchingRingFormingHoleValid

    Gets/Sets whether polygons using Self-Touching Rings to form holes are reported as valid. If this flag is set, the following Self-Touching conditions are treated as being valid:
    - The shell ring self-touches to create a hole touching the shell.
    - A hole ring self-touches to create two holes touching at a point.

    The default (following the OGC SFS standard) is that this condition is not valid (false).

    This does not affect whether Self-Touching Rings disconnecting the polygon interior are considered valid (these are considered to be invalid under the SFS, and many other spatial models as well). This includes "bow-tie" shells, which self-touch at a single point causing the interior to be disconnected, and "C-shaped" holes which self-touch at a single point causing an island to be formed.

    Declaration
    [Obsolete("Use SelfTouchingRingFormingHoleValid")]
    public bool IsSelfTouchingRingFormingHoleValid { get; set; }
    Property Value
    Type Description
    bool

    States whether geometry with this condition is valid.

    | Edit this page View Source

    IsValid

    Tests the validity of the input geometry.

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    bool

    true if the geometry is valid.

    | Edit this page View Source

    SelfTouchingRingFormingHoleValid

    Gets or sets a value indicating whether polygons using Self-Touching Rings to form holes are reported as valid. If this flag is set, the following Self-Touching conditions are treated as being valid:

    • the shell ring self-touches to create a hole touching the shell
    • a hole ring self-touches to create two holes touching at a point

    The default (following the OGC SFS standard) is that this condition is not valid (false).

    Self-Touching Rings which disconnect the the polygon interior are still considered to be invalid (these are invalid under the SFS, and many other spatial models as well). This includes:
    • exverted ("bow-tie") shells which self-touch at a single point
    • inverted shells with the inversion touching the shell at another point
    • exverted holes with exversion touching the hole at another point
    • inverted ("C-shaped") holes which self-touch at a single point causing an island to be formed
    • inverted shells or exverted holes which form part of a chain of touching rings (which disconnect the interior)
    Declaration
    public bool SelfTouchingRingFormingHoleValid { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    ValidationError

    Gets a value indicating the validity of the geometry If not valid, returns the validation error for the geometry, or null if the geometry is valid.

    Declaration
    public TopologyValidationError ValidationError { get; }
    Property Value
    Type Description
    TopologyValidationError

    The validation error, if the geometry is invalid or null if the geometry is valid

    Methods

    | Edit this page View Source

    CheckValid(Geometry)

    Tests whether a Geometry is valid.

    Declaration
    public static bool CheckValid(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The geometry to test

    Returns
    Type Description
    bool

    true if the geometry is valid

    Remarks

    In JTS this function is called IsValid

    | Edit this page View Source

    FindPointNotNode(Coordinate[], LinearRing, GeometryGraph)

    Find a point from the list of testCoords that is NOT a node in the edge for the list of searchCoords.

    Declaration
    [Obsolete]
    public static Coordinate FindPointNotNode(Coordinate[] testCoords, LinearRing searchRing, GeometryGraph graph)
    Parameters
    Type Name Description
    Coordinate[] testCoords
    LinearRing searchRing
    GeometryGraph graph
    Returns
    Type Description
    Coordinate

    The point found, or null if none found.

    | Edit this page View Source

    IsValidCoordinate(Coordinate)

    Checks whether a coordinate is valid for processing. Coordinates are valid if their x and y ordinates are in the range of the floating point representation.

    Declaration
    [Obsolete("Use Coordinate.IsValid")]
    public static bool IsValidCoordinate(Coordinate coord)
    Parameters
    Type Name Description
    Coordinate coord

    The coordinate to validate

    Returns
    Type Description
    bool

    true if the coordinate is valid

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