Search Results for

    Show / Hide Table of Contents

    Class OverlapUnion

    Unions MultiPolygons efficiently by using full topological union only for polygons which may overlap, and combining with the remaining polygons. Polygons which may overlap are those which intersect the common extent of the inputs. Polygons wholly outside this extent must be disjoint to the computed union. They can thus be simply combined with the union result, which is much more performant. (There is one caveat to this, which is discussed below).

    This situation is likely to occur during cascaded polygon union, since the partitioning of polygons is done heuristically and thus may group disjoint polygons which can lie far apart. It may also occur in real world data which contains many disjoint polygons (e.g. polygons representing parcels on different street blocks).
    Inheritance
    object
    OverlapUnion
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Operation.Union
    Assembly: NetTopologySuite.dll
    Syntax
    [Obsolete("Due to impairing performance")]
    public class OverlapUnion
    Remarks

    Algorithm

    The overlap region is determined as the common envelope of intersection. The input polygons are partitioned into two sets:
    • OverlappingPolygons which intersect the overlap region, and thus potentially overlap each other
    • DisjointPolygons which are disjoint from (lie wholly outside) the overlap region
    The Overlapping set is fully unioned, and then combined with the Disjoint set. Performing a simple combine works because the disjoint polygons do not interact with each other(since the inputs are valid MultiPolygons). They also do not interact with the Overlapping polygons, since they are outside their envelope.

    Discussion

    In general the Overlapping set of polygons will extend beyond the overlap envelope. This means that the union result will extend beyond the overlap region. There is a small chance that the topological union of the overlap region will shift the result linework enough that the result geometry intersects one of the Disjoint geometries. This situation is detected and if it occurs is remedied by falling back to performing a full union of the original inputs. Detection is done by a fairly efficient comparison of edge segments which extend beyond the overlap region. If any segments have changed then there is a risk of introduced intersections, and full union is performed.

    This situation has not been observed in JTS using floating precision, but it could happen due to snapping. It has been observed in other APIs(e.g.GEOS) due to more aggressive snapping. It is more likely to happen if a Snap - Rounding overlay is used.

    NOTE: Test has shown that using this heuristic impairs performance.

    Constructors

    | Edit this page View Source

    OverlapUnion(Geometry, Geometry)

    Creates a new instance for unioning the given geometries.

    Declaration
    public OverlapUnion(Geometry g0, Geometry g1)
    Parameters
    Type Name Description
    Geometry g0

    A geometry to union

    Geometry g1

    A geometry to union

    | Edit this page View Source

    OverlapUnion(Geometry, Geometry, UnionStrategy)

    Creates a new instance for unioning the given geometries.

    Declaration
    public OverlapUnion(Geometry g0, Geometry g1, UnionStrategy unionFun)
    Parameters
    Type Name Description
    Geometry g0

    A geometry to union

    Geometry g1

    A geometry to union

    UnionStrategy unionFun

    Function to union two geometries

    Methods

    | Edit this page View Source

    Union()

    Union a pair of geometries, using the more performant overlap union algorithm if possible.

    Declaration
    public Geometry Union()
    Returns
    Type Description
    Geometry

    The union of the inputs

    | Edit this page View Source

    Union(Geometry, Geometry)

    Union a pair of geometries, using the more performant overlap union algorithm if possible.

    Declaration
    public static Geometry Union(Geometry g0, Geometry g1)
    Parameters
    Type Name Description
    Geometry g0

    A geometry to union

    Geometry g1

    A geometry to union

    Returns
    Type Description
    Geometry

    The union of the inputs

    | Edit this page View Source

    Union(Geometry, Geometry, UnionStrategy)

    Union a pair of geometries, using the more performant overlap union algorithm if possible.

    Declaration
    public static Geometry Union(Geometry g0, Geometry g1, UnionStrategy unionFun)
    Parameters
    Type Name Description
    Geometry g0

    A geometry to union

    Geometry g1

    A geometry to union

    UnionStrategy unionFun

    Function to union two geometries

    Returns
    Type Description
    Geometry

    The union of the inputs

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