Search Results for

    Show / Hide Table of Contents

    Class TopologyPreservingSimplifier

    Simplifies a point and ensures that the result is a valid point having the same dimension and number of components as the input, and with the components having the same topological relationship.

    If the input is a polygonal geometry (Polygon or MultiPolygon):
    • The result has the same number of shells and holes as the input, with the same topological structure
    • The result rings touch at no more than the number of touching points in the input (although they may touch at fewer points). The key implication of this statement is that if the input is topologically valid, so is the simplified output.
    For linear geometries, if the input does not contain any intersecting line segments, this property will be preserved in the output.

    For polygonal geometries and LinearRings the endpoint will ring endpoint will be simplified. For LineStrings the endpoints will be unchanged.

    For all geometry types, the result will contain enough vertices to ensure validity. For polygons and closed linear geometries, the result will have at least 4 vertices; for open LineStrings the result will have at least 2 vertices.

    All geometry types are handled. Empty and point geometries are returned unchanged. Empty geometry components are deleted.

    The simplification uses a maximum-distance difference algorithm similar to the Douglas-Peucker algorithm.
    Inheritance
    object
    TopologyPreservingSimplifier
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Simplify
    Assembly: NetTopologySuite.dll
    Syntax
    public class TopologyPreservingSimplifier

    Constructors

    | Edit this page View Source

    TopologyPreservingSimplifier(Geometry)

    Creates an instance of this class for the provided inputGeom geometry

    Declaration
    public TopologyPreservingSimplifier(Geometry inputGeom)
    Parameters
    Type Name Description
    Geometry inputGeom

    The geometry to simplify

    Properties

    | Edit this page View Source

    DistanceTolerance

    Gets or sets the distance tolerance for the simplification.
    Points closer than this tolerance to a simplified segment may be removed.

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

    Methods

    | Edit this page View Source

    GetResultGeometry()

    Declaration
    public Geometry GetResultGeometry()
    Returns
    Type Description
    Geometry
    | Edit this page View Source

    Simplify(Geometry, double)

    Declaration
    public static Geometry Simplify(Geometry geom, double distanceTolerance)
    Parameters
    Type Name Description
    Geometry geom
    double distanceTolerance
    Returns
    Type Description
    Geometry

    See Also

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