GEOS
3.9.1dev
|
Provides versions of Geometry spatial functions which use common bit removal to reduce the likelihood of robustness problems. More...
#include <CommonBitsOp.h>
Public Member Functions | |
CommonBitsOp () | |
Creates a new instance of class, which reshifts result Geometry. More... | |
CommonBitsOp (bool nReturnToOriginalPrecision) | |
Creates a new instance of class, specifying whether the result geom::Geometrys should be reshifted. More... | |
std::unique_ptr< geom::Geometry > | intersection (const geom::Geometry *geom0, const geom::Geometry *geom1) |
Computes the set-theoretic intersection of two Geometry, using enhanced precision. More... | |
std::unique_ptr< geom::Geometry > | Union (const geom::Geometry *geom0, const geom::Geometry *geom1) |
Computes the set-theoretic union of two Geometry, using enhanced precision. More... | |
std::unique_ptr< geom::Geometry > | difference (const geom::Geometry *geom0, const geom::Geometry *geom1) |
Computes the set-theoretic difference of two Geometry, using enhanced precision. More... | |
std::unique_ptr< geom::Geometry > | symDifference (const geom::Geometry *geom0, const geom::Geometry *geom1) |
Computes the set-theoretic symmetric difference of two geometries, using enhanced precision. More... | |
std::unique_ptr< geom::Geometry > | buffer (const geom::Geometry *geom0, double distance) |
Computes the buffer a geometry, using enhanced precision. More... | |
std::unique_ptr< geom::Geometry > | computeResultPrecision (std::unique_ptr< geom::Geometry > result) |
If required, returning the result to the orginal precision if required. More... | |
Private Member Functions | |
std::unique_ptr< geom::Geometry > | removeCommonBits (const geom::Geometry *geom0) |
Computes a copy of the input Geometry with the calculated common bits removed from each coordinate. More... | |
void | removeCommonBits (const geom::Geometry *geom0, const geom::Geometry *geom1, std::unique_ptr< geom::Geometry > &rgeom0, std::unique_ptr< geom::Geometry > &rgeom1) |
Private Attributes | |
bool | returnToOriginalPrecision |
std::unique_ptr< CommonBitsRemover > | cbr |
Provides versions of Geometry spatial functions which use common bit removal to reduce the likelihood of robustness problems.
In the current implementation no rounding is performed on the reshifted result geometry, which means that it is possible that the returned Geometry is invalid. Client classes should check the validity of the returned result themselves.
Definition at line 50 of file CommonBitsOp.h.
geos::precision::CommonBitsOp::CommonBitsOp | ( | ) |
Creates a new instance of class, which reshifts result Geometry.
geos::precision::CommonBitsOp::CommonBitsOp | ( | bool | nReturnToOriginalPrecision | ) |
Creates a new instance of class, specifying whether the result geom::Geometrys should be reshifted.
nReturnToOriginalPrecision |
std::unique_ptr<geom::Geometry> geos::precision::CommonBitsOp::buffer | ( | const geom::Geometry * | geom0, |
double | distance | ||
) |
Computes the buffer a geometry, using enhanced precision.
geom0 | the Geometry to buffer |
distance | the buffer distance |
std::unique_ptr<geom::Geometry> geos::precision::CommonBitsOp::computeResultPrecision | ( | std::unique_ptr< geom::Geometry > | result | ) |
If required, returning the result to the orginal precision if required.
In this current implementation, no rounding is performed on the reshifted result geometry, which means that it is possible that the returned Geometry is invalid.
result | the result Geometry to modify |
std::unique_ptr<geom::Geometry> geos::precision::CommonBitsOp::difference | ( | const geom::Geometry * | geom0, |
const geom::Geometry * | geom1 | ||
) |
Computes the set-theoretic difference of two Geometry, using enhanced precision.
geom0 | the first Geometry |
geom1 | the second Geometry, to be subtracted from the first |
std::unique_ptr<geom::Geometry> geos::precision::CommonBitsOp::intersection | ( | const geom::Geometry * | geom0, |
const geom::Geometry * | geom1 | ||
) |
Computes the set-theoretic intersection of two Geometry, using enhanced precision.
geom0 | the first Geometry |
geom1 | the second Geometry |
|
private |
Computes a copy of the input Geometry with the calculated common bits removed from each coordinate.
geom0 | the Geometry to remove common bits from |
|
private |
std::unique_ptr<geom::Geometry> geos::precision::CommonBitsOp::symDifference | ( | const geom::Geometry * | geom0, |
const geom::Geometry * | geom1 | ||
) |
Computes the set-theoretic symmetric difference of two geometries, using enhanced precision.
geom0 | the first Geometry |
geom1 | the second Geometry |
std::unique_ptr<geom::Geometry> geos::precision::CommonBitsOp::Union | ( | const geom::Geometry * | geom0, |
const geom::Geometry * | geom1 | ||
) |
Computes the set-theoretic union of two Geometry, using enhanced precision.
geom0 | the first Geometry |
geom1 | the second Geometry |
|
private |
Definition at line 56 of file CommonBitsOp.h.
|
private |
Definition at line 54 of file CommonBitsOp.h.