GEOS
3.9.1dev
|
#include <OverlayUtil.h>
Static Public Member Functions | |
static bool | isFloating (const PrecisionModel *pm) |
static bool | clippingEnvelope (int opCode, const InputGeometry *inputGeom, const PrecisionModel *pm, Envelope &rsltEnvelope) |
static bool | isEmptyResult (int opCode, const Geometry *a, const Geometry *b, const PrecisionModel *pm) |
static bool | isEnvDisjoint (const Geometry *a, const Geometry *b, const PrecisionModel *pm) |
static std::unique_ptr< Geometry > | createEmptyResult (int dim, const GeometryFactory *geomFact) |
static int | resultDimension (int opCode, int dim0, int dim1) |
static std::unique_ptr< Geometry > | createResultGeometry (std::vector< std::unique_ptr< Polygon >> &resultPolyList, std::vector< std::unique_ptr< LineString >> &resultLineList, std::vector< std::unique_ptr< Point >> &resultPointList, const GeometryFactory *geometryFactory) |
static std::unique_ptr< Geometry > | toLines (OverlayGraph *graph, bool isOutputEdges, const GeometryFactory *geomFact) |
static bool | round (const Point *pt, const PrecisionModel *pm, Coordinate &rsltCoord) |
template<typename T > | |
static void | moveGeometry (std::vector< std::unique_ptr< T >> &inGeoms, std::vector< std::unique_ptr< Geometry >> &outGeoms) |
Static Private Member Functions | |
static bool | resultEnvelope (int opCode, const InputGeometry *inputGeom, const PrecisionModel *pm, Envelope &rsltEnvelope) |
static double | safeExpandDistance (const Envelope *env, const PrecisionModel *pm) |
static bool | safeEnv (const Envelope *env, const PrecisionModel *pm, Envelope &rsltEnvelope) |
static bool | isEmpty (const Geometry *geom) |
static bool | isDisjoint (const Envelope *envA, const Envelope *envB, const PrecisionModel *pm) |
Static Private Attributes | |
static constexpr double | SAFE_ENV_BUFFER_FACTOR = 0.1 |
static constexpr int | SAFE_ENV_GRID_FACTOR = 3 |
Utility methods for overlay processing.
Definition at line 57 of file OverlayUtil.h.
|
static |
Computes a clipping envelope for overlay input geometries. The clipping envelope encloses all geometry line segments which might participate in the overlay, with a buffer to account for numerical precision (in particular, rounding due to a precision model. The clipping envelope is used in both the RingClipper and in the LineLimiter.
Some overlay operations (i.e. UNION and SYMDIFFERENCE cannot use clipping as an optimization, since the result envelope is the full extent of the two input geometries. In this case the returned envelope is null to indicate this.
|
static |
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 an atomic geometry, not a collection (unless the dimension is -1, in which case a GEOMETRYCOLLECTION EMPTY is created.)
|
static |
Creates an overlay result geometry for homogeneous or mixed components.
|
staticprivate |
Tests for disjoint envelopes adjusting for rounding caused by a fixed precision model. Assumes envelopes are non-empty.
|
staticprivate |
|
static |
Tests if the result can be determined to be empty based on simple properties of the input geometries (such as whether one or both are empty, or their envelopes are disjoint).
|
static |
Tests if the geometry envelopes are disjoint, or empty. The disjoint test must take into account the precision model being used, since geometry coordinates may shift under rounding.
|
static |
|
inlinestatic |
Definition at line 168 of file OverlayUtil.h.
|
static |
Computes the dimension of the result of applying the given operation to inputs with the given dimensions. This assumes that complete collapse does not occur.
The result dimension is computed according to the following rules:
|
staticprivate |
Computes an envelope which covers the extent of the result of a given overlay operation for given inputs. The operations which have a result envelope smaller than the extent of the inputs are:
Otherwise, null
is returned to indicate full extent.
|
static |
Round the key point if precision model is fixed. Note: return value is only copied if rounding is performed.
|
staticprivate |
|
staticprivate |
|
static |
|
staticprivate |
Definition at line 61 of file OverlayUtil.h.
|
staticprivate |
Definition at line 62 of file OverlayUtil.h.