Search Results for

    Show / Hide Table of Contents

    Class Polygonizer

    Polygonizes a set of Geometrys which contain linework that represents the edges of a planar graph.

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

    All types of Geometry are accepted as input; the constituent linework is extracted as the edges to be polygonized. The processed edges must be correctly noded; that is, they must only meet at their endpoints. Polygonization will accept incorrectly noded input but will not form polygons from non-noded edges, and reports them as errors.

    The Polygonizer reports the follow kinds of errors:

    The Polygonizer(bool) constructor allows extracting only polygons which form a valid polygonal result. The set of extracted polygons is guaranteed to be edge-disjoint. This is useful for situations where it is known that the input lines form a valid polygonal geometry (which may include holes or nested polygons).

    Constructors

    | Edit this page View Source

    Polygonizer()

    Creates a polygonizer that extracts all polygons.

    Declaration
    public Polygonizer()
    | Edit this page View Source

    Polygonizer(bool)

    Creates a polygonizer, specifying whether a valid polygonal geometry must be created. If the argument is true then areas may be discarded in order to ensure that the extracted geometry is a valid polygonal geometry.

    Declaration
    public Polygonizer(bool extractOnlyPolygonal)
    Parameters
    Type Name Description
    bool extractOnlyPolygonal

    true if a valid polygonal geometry should be extracted

    Fields

    | Edit this page View Source

    AllPolys

    The default polygonizer output behavior

    Declaration
    public const bool AllPolys = false
    Field Value
    Type Description
    bool

    Properties

    | Edit this page View Source

    IsCheckingRingsValid

    Allows disabling the valid ring checking, to optimize situations where invalid rings are not expected.

    Declaration
    public bool IsCheckingRingsValid { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    The default is true

    Methods

    | Edit this page View Source

    Add(Geometry)

    Adds a Geometry to the linework to be polygonized. May be called multiple times. Any dimension of Geometry may be added; the constituent linework will be extracted and used

    Declaration
    public void Add(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    A Geometry with linework to be polygonized.

    | Edit this page View Source

    Add(ICollection<Geometry>)

    Adds a collection of Geometrys to be polygonized. May be called multiple times. Any dimension of Geometry may be added; the constituent linework will be extracted and used.

    Declaration
    public void Add(ICollection<Geometry> geomList)
    Parameters
    Type Name Description
    ICollection<Geometry> geomList

    A list of Geometrys with linework to be polygonized.

    | Edit this page View Source

    GetCutEdges()

    Gets the list of cut edges found during polygonization.

    Declaration
    public ICollection<LineString> GetCutEdges()
    Returns
    Type Description
    ICollection<LineString>
    | Edit this page View Source

    GetDangles()

    Gets the list of dangling lines found during polygonization.

    Declaration
    public ICollection<LineString> GetDangles()
    Returns
    Type Description
    ICollection<LineString>
    | Edit this page View Source

    GetGeometry()

    Gets a geometry representing the polygons formed by the polygonization. If a valid polygonal geometry was extracted the result is a IPolygonal geometry.

    Declaration
    public Geometry GetGeometry()
    Returns
    Type Description
    Geometry

    A geometry containing the polygons

    | Edit this page View Source

    GetInvalidRingLines()

    Gets the list of lines forming invalid rings found during polygonization.

    Declaration
    public IList<Geometry> GetInvalidRingLines()
    Returns
    Type Description
    IList<Geometry>
    | Edit this page View Source

    GetPolygons()

    Gets the list of polygons formed by the polygonization.

    Declaration
    public ICollection<Geometry> GetPolygons()
    Returns
    Type Description
    ICollection<Geometry>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX