Search Results for

    Show / Hide Table of Contents

    Namespace NetTopologySuite.Simplify

    Classes which implement algorithms for simplifying or generalizing geometries.

    Classes

    ComponentJumpChecker

    Checks if simplifying (flattening) line sections or segments would cause them to "jump" over other components in the geometry.

    DouglasPeuckerLineSimplifier

    Simplifies a line (sequence of points) using the standard Douglas-Peucker algorithm.

    DouglasPeuckerSimplifier

    Simplifies a Geometry using the Douglas-Peucker algorithm.

    LineSegmentIndex

    An index of LineSegments.

    LineSegmentVisitor

    ItemVisitor subclass to reduce volume of query results.

    OldVWLineSimplifier

    Simplifies a linestring (sequence of points) using the Visvalingam-Whyatt algorithm. The Visvalingam-Whyatt algorithm simplifies geometry by removing vertices while trying to minimize the area changed.

    PolygonHullSimplifier

    Computes topology-preserving simplified hulls of polygonal geometry. Both outer and inner hulls can be computed. Outer hulls contain the input geometry and are larger in area. Inner hulls are contained by the input geometry and are smaller in area. In both the hull vertices are a subset of the input vertices. The hull construction attempts to minimize the area difference with the input geometry.

    Hulls are generally concave if the input is. Computed hulls are topology-preserving: they do not contain any self-intersections or overlaps, so the result polygonal geometry is valid.

    Polygons with holes and MultiPolygons are supported. The result has the same geometric type and structure as the input.

    The number of vertices in the computed hull is determined by a target parameter. Two parameters are supported:
    • Vertex Number fractionthe fraction of the input vertices retained in the result. Value 1 produces the original geometry. Smaller values produce less concave results. For outer hulls, value 0 produces the convex hull (with triangles for any holes). For inner hulls, value 0 produces a triangle (if no holes are present).
    • Area Delta ratio the ratio of the change in area to the input area.Value 0 produces the original geometry. Larger values produce less concave results.
    The algorithm ensures that the result does not cause the target parameter to be exceeded. This allows computing outer or inner hulls with a small area delta ratio as an effective way of removing narrow gores and spikes.

    TaggedLineSegment

    A LineSegment which is tagged with its location in a Geometry. Used to index the segments in a point and recover the segment locations from the index.

    TaggedLineString

    Represents a LineString which can be modified to a simplified shape. This class provides an attribute which specifies the minimum allowable length for the modified result.

    TaggedLineStringSimplifier

    Simplifies a TaggedLineString, preserving topology (in the sense that no new intersections are introduced). Uses the recursive Douglas-Peucker algorithm.

    TaggedLinesSimplifier

    Simplifies a collection of TaggedLineStrings, preserving topology (in the sense that no new intersections are introduced). This class is essentially just a container for the common indexes used by TaggedLineStringSimplifier.

    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.

    VWLineSimplifier

    Simplifies a linestring (sequence of points) using the Visvalingam-Whyatt algorithm. The Visvalingam-Whyatt algorithm simplifies geometry by removing vertices while trying to minimize the area changed.

    VWSimplifier

    Simplifies a Geometry using the Visvalingam-Whyatt area-based algorithm. Ensures that any polygonal geometries returned are valid. Simple lines are not guaranteed to remain simple after simplification. All geometry types are handled. Empty and point geometries are returned unchanged. Empty geometry components are deleted. The simplification tolerance is specified as a distance. This is converted to an area tolerance by squaring it.

    Known Bugs * Not yet optimized for performance. * Does not simplify the endpoint of rings. To Do * Allow specifying desired number of vertices in the output.

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