Class OverlayNGRobust
- java.lang.Object
-
- org.locationtech.jts.operation.overlayng.OverlayNGRobust
-
public class OverlayNGRobust extends java.lang.ObjectPerforms an overlay operation usingOverlayNG, providing full 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
SnappingNoderusing an automatically-determined snap tolerance - First snapping each geometry to itself,
and then overlaying them using a
SnappingNoder. - The above two strategies are repeated with increasing snap tolerance, up to a limit.
- Finally a
SnapRoundngNoderis used with a automatically-determined scale factor intended to preserve input precision while still preventing robustness problems.
TopologyExceptionis thrown. In practice this is extremely unlikely to occur.This algorithm relies on each overlay operation execution throwing a
TopologyExceptionif 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 aValidatingNoderin order to check the results of using a floating noder.- Author:
- Martin Davis
- See Also:
OverlayNG
-
-
Constructor Summary
Constructors Constructor Description OverlayNGRobust()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Geometryoverlay(Geometry geom0, Geometry geom1, int opCode)Overlay two geometries, using heuristics to ensure computation completes correctly.static Geometryunion(Geometry geom)Computes unary union using robust computation.
-
-
-
Method Detail
-
union
public static Geometry union(Geometry geom)
Computes unary union using robust computation.- Parameters:
geom- the geometry to union- Returns:
- the union result
- See Also:
UnaryUnionOp
-
-