Search Results for

    Show / Hide Table of Contents

    Class EdgeRing

    Represents a ring of PolygonizeDirectedEdges which form a ring of a polygon. The ring may be either an outer shell or a hole.

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

    Constructors

    | Edit this page View Source

    EdgeRing(GeometryFactory)

    Declaration
    public EdgeRing(GeometryFactory factory)
    Parameters
    Type Name Description
    GeometryFactory factory

    Properties

    | Edit this page View Source

    Edges

    Declaration
    public IList<PolygonizeDirectedEdge> Edges { get; }
    Property Value
    Type Description
    IList<PolygonizeDirectedEdge>
    | Edit this page View Source

    HasShell

    Gets a value indicating whether this ring has a shell assigned to it.

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

    IsHole

    Tests whether this ring is a hole. Due to the way the edges in the polygonization graph are linked, a ring is a hole if it is oriented counter-clockwise.

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

    true if this ring is a hole.

    | Edit this page View Source

    IsIncluded

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

    IsIncludedSet

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

    IsOuterHole

    Tests whether this ring is an outer hole. A hole is an outer hole if it is not contained by a shell.

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

    IsOuterShell

    Tests whether this ring is an outer shell.

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

    IsProcessed

    Gets or sets a value indicating whether this ring has been processed.

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

    IsValid

    Gets a value indicating if the LinearRing ring formed by this edge ring is topologically valid.

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

    ComputeValid() must be called prior to accessing this property.

    | Edit this page View Source

    LineString

    Gets the coordinates for this ring as a LineString. Used to return the coordinates in this ring as a valid point, when it has been detected that the ring is topologically invalid.

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

    OuterHole

    Gets the outer hole of a shell, if it has one. An outer hole is one that is not contained in any other shell. Each disjoint connected group of shells is surrounded by an outer hole.

    Declaration
    public EdgeRing OuterHole { get; }
    Property Value
    Type Description
    EdgeRing

    The outer hole edge ring, or null

    | Edit this page View Source

    Polygon

    Computes and returns the Polygon formed by this ring and any contained holes.

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

    Ring

    Returns this ring as a LinearRing, or null if an Exception occurs while creating it (such as a topology problem).

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

    Shell

    Gets or sets a value indicating the containing shell ring of a ring that has been determined to be a hole.

    Declaration
    public EdgeRing Shell { get; }
    Property Value
    Type Description
    EdgeRing

    Methods

    | Edit this page View Source

    AddHole(LinearRing)

    Adds a hole to the polygon formed by this ring.

    Declaration
    public void AddHole(LinearRing hole)
    Parameters
    Type Name Description
    LinearRing hole

    The LinearRing forming the hole.

    | Edit this page View Source

    AddHole(EdgeRing)

    Adds a hole to the polygon formed by this ring.

    Declaration
    public void AddHole(EdgeRing holeER)
    Parameters
    Type Name Description
    EdgeRing holeER

    the LinearRing forming the hole.

    | Edit this page View Source

    Build(PolygonizeDirectedEdge)

    Declaration
    public void Build(PolygonizeDirectedEdge startDE)
    Parameters
    Type Name Description
    PolygonizeDirectedEdge startDE
    | Edit this page View Source

    ComputeHole()

    Computes whether this ring is a hole. Due to the way the edges in the polygonization graph are linked, a ring is a hole if it is oriented counter-clockwise.

    Declaration
    public void ComputeHole()
    | Edit this page View Source

    ComputeValid()

    Computes the validity of the ring. Must be called prior to calling IsValid.

    Declaration
    public void ComputeValid()
    | Edit this page View Source

    FindDirEdgesInRing(PolygonizeDirectedEdge)

    Traverses a ring of DirectedEdges, accumulating them into a list. This assumes that all dangling directed edges have been removed from the graph, so that there is always a next dirEdge.

    Declaration
    [Obsolete]
    public static List<DirectedEdge> FindDirEdgesInRing(PolygonizeDirectedEdge startDE)
    Parameters
    Type Name Description
    PolygonizeDirectedEdge startDE

    The DirectedEdge to start traversing at

    Returns
    Type Description
    List<DirectedEdge>

    A list of DirectedEdges that form a ring

    Remarks

    This function has a different return type than its counterpart in JTS. Use FindPolyDirEdgesInRing(PolygonizeDirectedEdge) instead.

    | Edit this page View Source

    FindEdgeRingContaining(EdgeRing, IList<EdgeRing>)

    Find the innermost enclosing shell EdgeRing containing the argument EdgeRing, if any. The innermost enclosing ring is the smallest enclosing ring. The algorithm used depends on the fact that: ring A contains ring B if envelope(ring A) contains envelope(ring B). This routine is only safe to use if the chosen point of the hole is known to be properly contained in a shell (which is guaranteed to be the case if the hole does not touch its shell).

    To improve performance of this function the caller should make the passed shellList as small as possible(e.g. by using a spatial index filter beforehand).
    Declaration
    public static EdgeRing FindEdgeRingContaining(EdgeRing testEr, IList<EdgeRing> erList)
    Parameters
    Type Name Description
    EdgeRing testEr
    IList<EdgeRing> erList
    Returns
    Type Description
    EdgeRing

    Containing EdgeRing or null if no containing EdgeRing is found.

    | Edit this page View Source

    FindPolyDirEdgesInRing(PolygonizeDirectedEdge)

    Traverses a ring of DirectedEdges, accumulating them into a list. This assumes that all dangling directed edges have been removed from the graph, so that there is always a next dirEdge.

    Declaration
    public static IList<PolygonizeDirectedEdge> FindPolyDirEdgesInRing(PolygonizeDirectedEdge startDE)
    Parameters
    Type Name Description
    PolygonizeDirectedEdge startDE

    The DirectedEdge to start traversing at

    Returns
    Type Description
    IList<PolygonizeDirectedEdge>

    A list of DirectedEdges that form a ring

    Remarks

    This function is called FindDirEdgesInRing in JTS.

    | Edit this page View Source

    IsInRing(Coordinate)

    Declaration
    [Obsolete("Will be removed in a future version")]
    public bool IsInRing(Coordinate pt)
    Parameters
    Type Name Description
    Coordinate pt
    Returns
    Type Description
    bool
    | Edit this page View Source

    Locate(Coordinate)

    Declaration
    public Location Locate(Coordinate pt)
    Parameters
    Type Name Description
    Coordinate pt
    Returns
    Type Description
    Location
    | Edit this page View Source

    ToString()

    Gets a string representation of this object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX