GEOS  3.9.1dev
Classes | Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
geos::operation::overlayng::OverlayNGRobust Class Reference

#include <OverlayNGRobust.h>

Classes

class  SRUnionStrategy
 

Static Public Member Functions

static std::unique_ptr< GeometryIntersection (const Geometry *g0, const Geometry *g1)
 
static std::unique_ptr< GeometryUnion (const Geometry *g0, const Geometry *g1)
 
static std::unique_ptr< GeometryDifference (const Geometry *g0, const Geometry *g1)
 
static std::unique_ptr< GeometrySymDifference (const Geometry *g0, const Geometry *g1)
 
static std::unique_ptr< GeometryUnion (const Geometry *a)
 
static std::unique_ptr< GeometryOverlay (const Geometry *geom0, const Geometry *geom1, int opCode)
 
static std::unique_ptr< GeometryoverlaySnapTries (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< GeometryoverlaySnapping (const Geometry *geom0, const Geometry *geom1, int opCode, double snapTol)
 
static std::unique_ptr< GeometryoverlaySnapBoth (const Geometry *geom0, const Geometry *geom1, int opCode, double snapTol)
 
static std::unique_ptr< GeometryoverlaySnapTol (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< GeometryoverlaySR (const Geometry *geom0, const Geometry *geom1, int opCode)
 
static std::unique_ptr< GeometrysnapSelf (const Geometry *geom, double snapTol)
 

Static Private Attributes

static constexpr int NUM_SNAP_TRIES = 5
 
static constexpr double SNAP_TOL_FACTOR = 1e12
 

Detailed Description

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.

Author
Martin Davis

Definition at line 64 of file OverlayNGRobust.h.

Member Function Documentation

static std::unique_ptr<Geometry> geos::operation::overlayng::OverlayNGRobust::Difference ( const Geometry g0,
const Geometry g1 
)
static
static std::unique_ptr<Geometry> geos::operation::overlayng::OverlayNGRobust::Intersection ( const Geometry g0,
const Geometry g1 
)
static
static double geos::operation::overlayng::OverlayNGRobust::ordinateMagnitude ( const Geometry geom)
staticprivate

Computes the largest magnitude of the ordinates of a geometry, based on the geometry envelope.

Parameters
geoma geometry
Returns
the magnitude of the largest ordinate
static std::unique_ptr<Geometry> geos::operation::overlayng::OverlayNGRobust::Overlay ( const Geometry geom0,
const Geometry geom1,
int  opCode 
)
static
static std::unique_ptr<Geometry> geos::operation::overlayng::OverlayNGRobust::overlaySnapBoth ( const Geometry geom0,
const Geometry geom1,
int  opCode,
double  snapTol 
)
staticprivate
static std::unique_ptr<Geometry> geos::operation::overlayng::OverlayNGRobust::overlaySnapping ( const Geometry geom0,
const Geometry geom1,
int  opCode,
double  snapTol 
)
staticprivate
static std::unique_ptr<Geometry> geos::operation::overlayng::OverlayNGRobust::overlaySnapTol ( const Geometry geom0,
const Geometry geom1,
int  opCode,
double  snapTol 
)
staticprivate
static std::unique_ptr<Geometry> geos::operation::overlayng::OverlayNGRobust::overlaySnapTries ( const Geometry geom0,
const Geometry geom1,
int  opCode 
)
static
static std::unique_ptr<Geometry> geos::operation::overlayng::OverlayNGRobust::overlaySR ( const Geometry geom0,
const Geometry geom1,
int  opCode 
)
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.

static std::unique_ptr<Geometry> geos::operation::overlayng::OverlayNGRobust::snapSelf ( const Geometry geom,
double  snapTol 
)
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.

Parameters
geomgeometry to self-snap
snapTolsnap tolerance
Returns
the snapped geometry (homogeneous)
static double geos::operation::overlayng::OverlayNGRobust::snapTolerance ( const Geometry geom)
staticprivate
static double geos::operation::overlayng::OverlayNGRobust::snapTolerance ( const Geometry geom0,
const Geometry geom1 
)
static

Computes a heuristic snap tolerance distance for overlaying a pair of geometries using a noding::snap::SnappingNoder.

static std::unique_ptr<Geometry> geos::operation::overlayng::OverlayNGRobust::SymDifference ( const Geometry g0,
const Geometry g1 
)
static
static std::unique_ptr<Geometry> geos::operation::overlayng::OverlayNGRobust::Union ( const Geometry g0,
const Geometry g1 
)
static
static std::unique_ptr<Geometry> geos::operation::overlayng::OverlayNGRobust::Union ( const Geometry a)
static

Member Data Documentation

constexpr int geos::operation::overlayng::OverlayNGRobust::NUM_SNAP_TRIES = 5
staticprivate

Definition at line 70 of file OverlayNGRobust.h.

constexpr double geos::operation::overlayng::OverlayNGRobust::SNAP_TOL_FACTOR = 1e12
staticprivate

A factor for a snapping tolerance distance which should allow noding to be computed robustly.

Definition at line 75 of file OverlayNGRobust.h.


The documentation for this class was generated from the following file: