Search Results for

    Show / Hide Table of Contents

    Class OverlayOp

    Computes the geometric overlay of two Geometrys. The overlay can be used to determine any bool combination of the geometries.

    Inheritance
    object
    GeometryGraphOperation
    OverlayOp
    Inherited Members
    GeometryGraphOperation.lineIntersector
    GeometryGraphOperation.resultPrecisionModel
    GeometryGraphOperation.arg
    GeometryGraphOperation.GetArgGeometry(int)
    GeometryGraphOperation.ComputationPrecision
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Operation.Overlay
    Assembly: NetTopologySuite.dll
    Syntax
    public class OverlayOp : GeometryGraphOperation

    Constructors

    | Edit this page View Source

    OverlayOp(Geometry, Geometry)

    Constructs an instance to compute a single overlay operation for the given geometries.

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

    The first geometry argument

    Geometry g1

    The second geometry argument

    Properties

    | Edit this page View Source

    Graph

    Gets the graph constructed to compute the overlay.

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

    NodingValidatorDisabled

    Disable EdgeNodingValidator when an intersection is made (ComputeOverlay(SpatialFunction)), so performances are dramatically improved but failures are not managed.

    Declaration
    public static bool NodingValidatorDisabled { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    Use ay your own risk!

    Methods

    | Edit this page View Source

    CreateEmptyResult(SpatialFunction, Geometry, Geometry, GeometryFactory)

    Creates an empty result geometry of the appropriate dimension, based on the given overlay operation and the dimensions of the inputs. The created geometry is always an atomic geometry, not a collection.

    The empty result is constructed using the following rules:
    • Intersection - result has the dimension of the lowest input dimension
    • Union - result has the dimension of the highest input dimension
    • Difference - result has the dimension of the left-hand input
    • SymDifference - result has the dimension of the highest input dimension (since symDifference is the union of the differences).
    Declaration
    public static Geometry CreateEmptyResult(SpatialFunction overlayOpCode, Geometry a, Geometry b, GeometryFactory geomFact)
    Parameters
    Type Name Description
    SpatialFunction overlayOpCode

    The overlay operation being performed

    Geometry a

    An input geometry

    Geometry b

    An input geometry

    GeometryFactory geomFact

    The geometry factory being used for the operation

    Returns
    Type Description
    Geometry

    An empty atomic geometry of the appropriate dimension

    | Edit this page View Source

    GetResultGeometry(SpatialFunction)

    Gets the result of the overlay for a given overlay operation.

    Note: this method can be called once only.
    Declaration
    public Geometry GetResultGeometry(SpatialFunction overlayOpCode)
    Parameters
    Type Name Description
    SpatialFunction overlayOpCode

    The code of the overlay operation to perform

    Returns
    Type Description
    Geometry

    The computed result geometry

    Exceptions
    Type Condition
    TopologyException

    Thrown if a robustness problem is encountered

    | Edit this page View Source

    InsertUniqueEdge(Edge)

    Insert an edge from one of the noded input graphs. Checks edges that are inserted to see if an identical edge already exists. If so, the edge is not inserted, but its label is merged with the existing edge.

    Declaration
    protected void InsertUniqueEdge(Edge e)
    Parameters
    Type Name Description
    Edge e

    The edge to insert

    | Edit this page View Source

    IsCoveredByA(Coordinate)

    Tests if an L edge should be included in the result or not.

    Declaration
    public bool IsCoveredByA(Coordinate coord)
    Parameters
    Type Name Description
    Coordinate coord

    The point coordinate

    Returns
    Type Description
    bool

    true if the coordinate point is covered by a result Area geometry.

    | Edit this page View Source

    IsCoveredByLA(Coordinate)

    Tests if a point node should be included in the result or not.

    Declaration
    public bool IsCoveredByLA(Coordinate coord)
    Parameters
    Type Name Description
    Coordinate coord

    The point coordinate

    Returns
    Type Description
    bool

    true if the coordinate point is covered by a result Line or Area geometry.

    | Edit this page View Source

    IsResultOfOp(Location, Location, SpatialFunction)

    Tests whether a point with given Locations relative to two geometries is contained in the result of overlaying the geometries using a given overlay operation.

    The method handles arguments of Null correctly
    Declaration
    public static bool IsResultOfOp(Location loc0, Location loc1, SpatialFunction overlayOpCode)
    Parameters
    Type Name Description
    Location loc0

    the code for the location in the first geometry

    Location loc1

    the code for the location in the second geometry

    SpatialFunction overlayOpCode

    the code for the overlay operation to test

    Returns
    Type Description
    bool

    true if the locations correspond to the overlayOpCode.

    | Edit this page View Source

    IsResultOfOp(Label, SpatialFunction)

    Tests whether a point with a given topological Label relative to two geometries is contained in the result of overlaying the geometries using a given overlay operation.

    The method handles arguments of Null correctly
    Declaration
    public static bool IsResultOfOp(Label label, SpatialFunction overlayOpCode)
    Parameters
    Type Name Description
    Label label

    The topological label of the point

    SpatialFunction overlayOpCode

    The code for the overlay operation to test

    Returns
    Type Description
    bool

    true if the label locations correspond to the overlayOpCode

    | Edit this page View Source

    Overlay(Geometry, Geometry, SpatialFunction)

    Computes an overlay operation for the given geometry arguments.

    Declaration
    public static Geometry Overlay(Geometry geom0, Geometry geom1, SpatialFunction opCode)
    Parameters
    Type Name Description
    Geometry geom0

    The first geometry argument

    Geometry geom1

    The second geometry argument

    SpatialFunction opCode

    The code for the desired overlay operation

    Returns
    Type Description
    Geometry

    The result of the overlay operation

    Exceptions
    Type Condition
    TopologyException

    Thrown if a robustness problem is encountered.

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