GEOS 3.14.0dev
|
Builds the buffer geometry for a given input geometry and precision model. More...
#include <BufferBuilder.h>
Public Member Functions | |
BufferBuilder (const BufferParameters &nBufParams) | |
void | setWorkingPrecisionModel (const geom::PrecisionModel *pm) |
void | setNoder (noding::Noder *newNoder) |
void | setInvertOrientation (bool p_isInvertOrientation) |
std::unique_ptr< geom::Geometry > | buffer (const geom::Geometry *g, double distance) |
std::unique_ptr< geom::Geometry > | bufferLineSingleSided (const geom::Geometry *g, double distance, bool leftSide) |
Builds the buffer geometry for a given input geometry and precision model.
Allows setting the level of approximation for circular arcs, and the precision model in which to carry out the computation.
When computing buffers in floating point double-precision it can happen that the process of iterated noding can fail to converge (terminate).
In this case a TopologyException will be thrown. Retrying the computation in a fixed precision can produce more robust results.
|
inline |
Creates a new BufferBuilder
nBufParams | buffer parameters, this object will keep a reference to the passed parameters so caller must make sure the object is kept alive for the whole lifetime of the buffer builder. |
std::unique_ptr< geom::Geometry > geos::operation::buffer::BufferBuilder::bufferLineSingleSided | ( | const geom::Geometry * | g, |
double | distance, | ||
bool | leftSide | ||
) |
Generates offset curve for linear geometry.
g | non-areal geometry object |
distance | width of offset |
leftSide | controls on which side of the input geometry offset curve is generated. |
|
inline |
Sets whether the offset curve is generated using the inverted orientation of input rings. This allows generating a buffer(0) polygon from the smaller lobes of self-crossing rings.
p_isInvertOrientation | true if input ring orientation should be inverted |
|
inline |
Sets the noding::Noder
to use during noding. This allows choosing fast but non-robust noding, or slower but robust noding.
newNoder | the noder to use |
|
inline |
Sets the precision model to use during the curve computation and noding, if it is different to the precision model of the Geometry. If the precision model is less than the precision of the Geometry precision model, the Geometry must have previously been rounded to that precision.
pm | the precision model to use |