GEOS
3.9.1dev
|
#include <OverlayNGRobust.h>
Classes | |
class | SRUnionStrategy |
Static Public Member Functions | |
static std::unique_ptr< Geometry > | Intersection (const Geometry *g0, const Geometry *g1) |
static std::unique_ptr< Geometry > | Union (const Geometry *g0, const Geometry *g1) |
static std::unique_ptr< Geometry > | Difference (const Geometry *g0, const Geometry *g1) |
static std::unique_ptr< Geometry > | SymDifference (const Geometry *g0, const Geometry *g1) |
static std::unique_ptr< Geometry > | Union (const Geometry *a) |
static std::unique_ptr< Geometry > | Overlay (const Geometry *geom0, const Geometry *geom1, int opCode) |
static std::unique_ptr< Geometry > | overlaySnapTries (const Geometry *geom0, const Geometry *geom1, int opCode) |
static double | snapTolerance (const Geometry *geom0, const Geometry *geom1) |
Static Private Member Functions | |
static std::unique_ptr< Geometry > | overlaySnapping (const Geometry *geom0, const Geometry *geom1, int opCode, double snapTol) |
static std::unique_ptr< Geometry > | overlaySnapBoth (const Geometry *geom0, const Geometry *geom1, int opCode, double snapTol) |
static std::unique_ptr< Geometry > | overlaySnapTol (const Geometry *geom0, const Geometry *geom1, int opCode, double snapTol) |
static double | snapTolerance (const Geometry *geom) |
static double | ordinateMagnitude (const Geometry *geom) |
static std::unique_ptr< Geometry > | overlaySR (const Geometry *geom0, const Geometry *geom1, int opCode) |
static std::unique_ptr< Geometry > | snapSelf (const Geometry *geom, double snapTol) |
Static Private Attributes | |
static constexpr int | NUM_SNAP_TRIES = 5 |
static constexpr double | SNAP_TOL_FACTOR = 1e12 |
Performs an overlay operation, increasing robustness by using a series of increasingly aggressive (and slower) noding strategies.
The noding strategies used are:
If the above heuristics still fail to compute a valid overlay, the original util::TopologyException is thrown.
This algorithm relies on each overlay operation execution throwing a util::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 noding::ValidatingNoder in order to check the results of using a floating noder.
Definition at line 64 of file OverlayNGRobust.h.
|
static |
|
static |
|
staticprivate |
Computes the largest magnitude of the ordinates of a geometry, based on the geometry envelope.
geom | a geometry |
|
static |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
|
staticprivate |
Overlay using Snap-Rounding with an automatically-determined scale factor.
NOTE: currently this strategy is not used, since all known test cases work using one of the Snapping strategies.
|
staticprivate |
Self-snaps a geometry by running a union operation with it as the only input. This helps to remove narrow spike/gore artifacts to simplify the geometry, which improves robustness. Collapsed artifacts are removed from the result to allow using it in further overlay operations.
geom | geometry to self-snap |
snapTol | snap tolerance |
|
staticprivate |
|
static |
Computes a heuristic snap tolerance distance for overlaying a pair of geometries using a noding::snap::SnappingNoder.
|
static |
|
static |
|
static |
|
staticprivate |
Definition at line 70 of file OverlayNGRobust.h.
|
staticprivate |
A factor for a snapping tolerance distance which should allow noding to be computed robustly.
Definition at line 75 of file OverlayNGRobust.h.