GEOS
3.9.1dev
|
Builds the buffer geometry for a given input geometry and precision model. More...
#include <BufferBuilder.h>
Public Member Functions | |
BufferBuilder (const BufferParameters &nBufParams) | |
~BufferBuilder () | |
void | setWorkingPrecisionModel (const geom::PrecisionModel *pm) |
void | setNoder (noding::Noder *newNoder) |
geom::Geometry * | buffer (const geom::Geometry *g, double distance) |
geom::Geometry * | bufferLineSingleSided (const geom::Geometry *g, double distance, bool leftSide) |
Private Member Functions | |
void | computeNodedEdges (std::vector< noding::SegmentString * > &bufSegStr, const geom::PrecisionModel *precisionModel) |
void | insertUniqueEdge (geomgraph::Edge *e) |
void | createSubgraphs (geomgraph::PlanarGraph *graph, std::vector< BufferSubgraph * > &list) |
void | buildSubgraphs (const std::vector< BufferSubgraph * > &subgraphList, overlay::PolygonBuilder &polyBuilder) |
noding::Noder * | getNoder (const geom::PrecisionModel *precisionModel) |
Return the externally-set noding::Noder OR a newly created one using the given precisionModel. More... | |
geom::Geometry * | createEmptyResultGeometry () const |
BufferBuilder (const BufferBuilder &other)=delete | |
BufferBuilder & | operator= (const BufferBuilder &rhs)=delete |
Static Private Member Functions | |
static int | depthDelta (const geomgraph::Label &label) |
Private Attributes | |
const BufferParameters & | bufParams |
const geom::PrecisionModel * | workingPrecisionModel |
algorithm::LineIntersector * | li |
noding::IntersectionAdder * | intersectionAdder |
noding::Noder * | workingNoder |
const geom::GeometryFactory * | geomFact |
geomgraph::EdgeList | edgeList |
std::vector< geomgraph::Label * > | newLabels |
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.
Definition at line 88 of file BufferBuilder.h.
|
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. |
Definition at line 100 of file BufferBuilder.h.
geos::operation::buffer::BufferBuilder::~BufferBuilder | ( | ) |
|
privatedelete |
geom::Geometry* geos::operation::buffer::BufferBuilder::buffer | ( | const geom::Geometry * | g, |
double | distance | ||
) |
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. |
|
private |
Completes the building of the input subgraphs by depth-labelling them, and adds them to the PolygonBuilder. The subgraph list must be sorted in rightmost-coordinate order.
subgraphList | the subgraphs to build |
polyBuilder | the PolygonBuilder which will build the final polygons |
|
private |
|
private |
Gets the standard result for an empty buffer. Since buffer always returns a polygonal result, this is chosen to be an empty polygon.
|
private |
|
staticprivate |
Compute the change in depth as an edge is crossed from R to L
|
private |
Return the externally-set noding::Noder OR a newly created one using the given precisionModel.
NOTE: if an externally-set noding::Noder is available no check is performed to ensure it will use the given PrecisionModel
|
private |
Inserted edges are checked to see if an identical edge already exists. If so, the edge is not inserted, but its label is merged with the existing edge.
The function takes responsability of releasing the Edge parameter memory when appropriate.
|
privatedelete |
|
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 |
Definition at line 138 of file BufferBuilder.h.
|
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 |
Definition at line 125 of file BufferBuilder.h.
|
private |
Definition at line 175 of file BufferBuilder.h.
|
private |
Definition at line 187 of file BufferBuilder.h.
|
private |
Definition at line 185 of file BufferBuilder.h.
|
private |
Definition at line 181 of file BufferBuilder.h.
|
private |
Definition at line 179 of file BufferBuilder.h.
|
private |
Definition at line 189 of file BufferBuilder.h.
|
private |
Definition at line 183 of file BufferBuilder.h.
|
private |
Definition at line 177 of file BufferBuilder.h.