Class OverlayNGRobust
Performs an overlay operation using OverlayNG, increasing robustness by using a series of increasingly robust (but slower) noding strategies.
The noding strategies used are:
- A simple fast noder using Floating precision
- A SnappingNoder using an automatically-determined snap tolerance
- First snapping each geometry to itself, and then overlaying them wih a SnappingNoder
- The above two strategies are repeated with increasing snap tolerance, up to a limit
- Finally a SnapRoundingNoder is used with a automatically-determined scale factor.
This algorithm relies on each overlay operation execution throwing a TopologyException if it is unable to compute the overlay correctly. Generally this occurs because the noding phase does not produce a valid noding. This requires the use of a ValidatingNoder in order to check the results of using a floating noder.
Inherited Members
Namespace: NetTopologySuite.Operation.OverlayNG
Assembly: NetTopologySuite.dll
Syntax
public sealed class OverlayNGRobust
Methods
| Improve this Doc View SourceOverlay(Geometry, Geometry, SpatialFunction)
Overlay two geometries, using heuristics to ensure computation completes correctly. In practice the heuristics are observed to be fully correct.
Declaration
public static Geometry Overlay(Geometry geom0, Geometry geom1, SpatialFunction opCode)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geom0 | A geometry |
Geometry | geom1 | A geometry |
SpatialFunction | opCode | The overlay operation code |
Returns
Type | Description |
---|---|
Geometry | The overlay result geometry |
OverlaySR(Geometry, Geometry, SpatialFunction)
Attempt Overlay using Snap-Rounding with an automatically-determined scale factor.
Declaration
public static Geometry OverlaySR(Geometry geom0, Geometry geom1, SpatialFunction opCode)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geom0 | |
Geometry | geom1 | |
SpatialFunction | opCode |
Returns
Type | Description |
---|---|
Geometry | the computed overlay result, or null if the overlay fails |
Union(Geometry)
Computes the unary union of a geometry using robust computation.
Declaration
public static Geometry Union(Geometry geom)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geom | The geometry to union |
Returns
Type | Description |
---|---|
Geometry | The union result |
Union(IEnumerable<Geometry>)
Computes the unary union of a collection of geometries using robust computation.
Declaration
public static Geometry Union(IEnumerable<Geometry> geoms)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Geometry> | geoms | An enumeration of geometries to union |
Returns
Type | Description |
---|---|
Geometry | The union result |
Union(IEnumerable<Geometry>, GeometryFactory)
Computes the unary union of a collection of geometries using robust computation.
Declaration
public static Geometry Union(IEnumerable<Geometry> geoms, GeometryFactory geomFact)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Geometry> | geoms | An enumeration of geometries to union |
GeometryFactory | geomFact | The geometry factory to use |
Returns
Type | Description |
---|---|
Geometry | The union of the geometries |