Search Results for

    Show / Hide Table of Contents

    Class VoronoiDiagramBuilder

    A utility class which creates Voronoi Diagrams from collections of points. The diagram is returned as a GeometryCollection of NetTopologySuite.Triangulate.Polygons, representing the faces of the Voronoi diagram. /// The faces are clipped to the larger of:

    • an envelope supplied by ClipEnvelope.set.
    • an envelope determined by the input sites.
    The userData attribute of each face Polygon is set to the Coordinate of the corresponding input site. This allows using a Map to link faces to data associated with sites.
    Inheritance
    object
    VoronoiDiagramBuilder
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Triangulate
    Assembly: NetTopologySuite.dll
    Syntax
    public class VoronoiDiagramBuilder

    Properties

    | Edit this page View Source

    ClipEnvelope

    Sets the envelope to clip the diagram to. The diagram will be clipped to the larger of this envelope or an envelope surrounding the sites.

    Declaration
    public Envelope ClipEnvelope { set; }
    Property Value
    Type Description
    Envelope
    Remarks

    the clip envelope.

    | Edit this page View Source

    Tolerance

    Sets the snapping tolerance which will be used to improved the robustness of the triangulation computation. A tolerance of 0.0 specifies that no snapping will take place.

    Declaration
    public double Tolerance { set; }
    Property Value
    Type Description
    double
    Remarks

    tolerance the tolerance distance to use

    Methods

    | Edit this page View Source

    GetDiagram(GeometryFactory)

    Gets the faces of the computed diagram as a GeometryCollection of NetTopologySuite.Triangulate.Polygons, clipped as specified.

    The UserData attribute of each face NetTopologySuite.Triangulate.Polygon is set to the Coordinate of the corresponding input site. This allows using a IDictionary<TKey, TValue> to link faces to data associated with sites.
    Declaration
    public GeometryCollection GetDiagram(GeometryFactory geomFact)
    Parameters
    Type Name Description
    GeometryFactory geomFact

    the geometry factory to use to create the output

    Returns
    Type Description
    GeometryCollection

    a GeometryCollection containing the face NetTopologySuite.Triangulate.Polygons of the diagram

    | Edit this page View Source

    GetSubdivision()

    Gets the QuadEdgeSubdivision which models the computed diagram.

    Declaration
    public QuadEdgeSubdivision GetSubdivision()
    Returns
    Type Description
    QuadEdgeSubdivision

    the subdivision containing the triangulation

    | Edit this page View Source

    SetSites(Geometry)

    Sets the sites (point or vertices) which will be diagrammed. All vertices of the given geometry will be used as sites.

    Declaration
    public void SetSites(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    geom the geometry from which the sites will be extracted.

    | Edit this page View Source

    SetSites(ICollection<Coordinate>)

    Sets the sites (point or vertices) which will be diagrammed from a collection of Coordinates.

    Declaration
    public void SetSites(ICollection<Coordinate> coords)
    Parameters
    Type Name Description
    ICollection<Coordinate> coords

    a collection of Coordinates.

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