GEOS  3.13.0dev
Public Member Functions | List of all members
geos::precision::CommonBitsOp Class Reference

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.
 
 CommonBitsOp (bool nReturnToOriginalPrecision)
 Creates a new instance of class, specifying whether the result geom::Geometrys should be reshifted. More...
 
std::unique_ptr< geom::Geometryintersection (const geom::Geometry *geom0, const geom::Geometry *geom1)
 Computes the set-theoretic intersection of two Geometry, using enhanced precision. More...
 
std::unique_ptr< geom::GeometryUnion (const geom::Geometry *geom0, const geom::Geometry *geom1)
 Computes the set-theoretic union of two Geometry, using enhanced precision. More...
 
std::unique_ptr< geom::Geometrydifference (const geom::Geometry *geom0, const geom::Geometry *geom1)
 Computes the set-theoretic difference of two Geometry, using enhanced precision. More...
 
std::unique_ptr< geom::GeometrysymDifference (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::Geometrybuffer (const geom::Geometry *geom0, double distance)
 Computes the buffer a geometry, using enhanced precision. More...
 
std::unique_ptr< geom::GeometrycomputeResultPrecision (std::unique_ptr< geom::Geometry > result)
 If required, returning the result to the orginal precision if required. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CommonBitsOp()

geos::precision::CommonBitsOp::CommonBitsOp ( bool  nReturnToOriginalPrecision)

Creates a new instance of class, specifying whether the result geom::Geometrys should be reshifted.

Parameters
nReturnToOriginalPrecision

Member Function Documentation

◆ buffer()

std::unique_ptr<geom::Geometry> geos::precision::CommonBitsOp::buffer ( const geom::Geometry geom0,
double  distance 
)

Computes the buffer a geometry, using enhanced precision.

Parameters
geom0the Geometry to buffer
distancethe buffer distance
Returns
the Geometry representing the buffer of the input Geometry.

◆ computeResultPrecision()

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.

Parameters
resultthe result Geometry to modify
Returns
the result Geometry with the required precision

◆ difference()

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.

Parameters
geom0the first Geometry
geom1the second Geometry, to be subtracted from the first
Returns
the Geometry representing the set-theoretic difference of the input Geometries.

◆ intersection()

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.

Parameters
geom0the first Geometry
geom1the second Geometry
Returns
the Geometry representing the set-theoretic intersection of the input Geometries.

◆ symDifference()

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.

Parameters
geom0the first Geometry
geom1the second Geometry
Returns
the Geometry representing the set-theoretic symmetric difference of the input Geometries.

◆ Union()

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.

Parameters
geom0the first Geometry
geom1the second Geometry
Returns
the Geometry representing the set-theoretic union of the input Geometries.

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