Search Results for

    Show / Hide Table of Contents

    Class CoverageValidator

    Validates a polygonal coverage, and returns the locations of invalid polygon boundary segments if found.

    A polygonal coverage is a set of polygons which may be edge-adjacent but do not overlap. Coverage algorithms(such as { @link CoverageUnion} or simplification) generally require the input coverage to be valid to produce correct results. A polygonal coverage is valid if:
    1. The interiors of all polygons do not intersect(are disjoint). This is the case if no polygon has a boundary which intersects the interior of another polygon, and no two polygons are identical.
    2. If the boundaries of polygons intersect, the vertices and line segments of the intersection match exactly.

    A valid coverage may contain holes(regions of no coverage). Sometimes it is desired to detect whether coverages contain narrow gaps between polygons (which can be a result of digitizing error or misaligned data). This class can detect narrow gaps, by specifying a maximum gap width using {@link #setGapWidth(double)}. Note that this also identifies narrow gaps separating disjoint coverage regions, and narrow gores. In some situations it may also produce false positives (linework identified as part of a gap which is actually wider). See CoverageGapFinder for an alternate way to detect gaps which may be more accurate.
    Inheritance
    object
    CoverageValidator
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Coverage
    Assembly: NetTopologySuite.dll
    Syntax
    public class CoverageValidator

    Constructors

    | Edit this page View Source

    CoverageValidator(Geometry[])

    Creates a new coverage validator

    Declaration
    public CoverageValidator(Geometry[] coverage)
    Parameters
    Type Name Description
    Geometry[] coverage

    An array of polygons representing a polygonal coverage

    Properties

    | Edit this page View Source

    GapWidth

    Gets or sets a value indicating the maximum gap, if narrow gaps are to be detected.

    Declaration
    public double GapWidth { get; set; }
    Property Value
    Type Description
    double

    Methods

    | Edit this page View Source

    HasInvalidResult(Geometry[])

    Tests if some element of an array of geometries is a coverage invalidity indicator.

    Declaration
    public static bool HasInvalidResult(Geometry[] validateResult)
    Parameters
    Type Name Description
    Geometry[] validateResult

    An array produced by a polygonal coverage validation

    Returns
    Type Description
    bool

    true if the result has at least one invalid indicator

    | Edit this page View Source

    IsValid(Geometry[])

    Tests whether a polygonal coverage is valid.

    Declaration
    public static bool IsValid(Geometry[] coverage)
    Parameters
    Type Name Description
    Geometry[] coverage

    An array of polygons forming a coverage

    Returns
    Type Description
    bool

    true if the coverage is valid

    Remarks

    Named isValid in JTS

    | Edit this page View Source

    Validate()

    Validates the polygonal coverage. The result is an array of the same size as the input coverage. Each array entry is either null, or if the polygon does not form a valid coverage, a linear geometry containing the boundary segments which intersect polygon interiors, which are mismatched, or form gaps (if checked).

    Declaration
    public Geometry[] Validate()
    Returns
    Type Description
    Geometry[]

    An array of nulls or linear geometries

    | Edit this page View Source

    Validate(Geometry[])

    Validates that a set of polygons forms a valid polygonal coverage, and returns linear geometries indicating the locations of invalidities, if any.

    Declaration
    public static Geometry[] Validate(Geometry[] coverage)
    Parameters
    Type Name Description
    Geometry[] coverage

    An array of polygons forming a coverage

    Returns
    Type Description
    Geometry[]

    An array of linear geometries indicating coverage errors, or nulls

    | Edit this page View Source

    Validate(Geometry[], double)

    Validates that a set of polygons forms a valid polygonal coverage and contains no gaps narrower than a specified width. The result is an array of linear geometries indicating the locations of invalidities, or null if the polygon is coverage-valid.

    Declaration
    public static Geometry[] Validate(Geometry[] coverage, double gapWidth)
    Parameters
    Type Name Description
    Geometry[] coverage

    An array of polygons forming a coverage

    double gapWidth

    The maximum width of invalid gaps

    Returns
    Type Description
    Geometry[]

    An array of linear geometries indicating coverage errors, or nulls

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