GEOS: geos::operation::buffer::BufferBuilder Class Reference

GEOS 3.5.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
geos::operation::buffer::BufferBuilder Class Reference

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)
geom::Geometry * | buffer (const geom::Geometry *g, double distance)
geom::Geometry * | bufferLineSingleSided (const geom::Geometry *g, double distance, bool leftSide)

## Detailed Description

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.

## Constructor & Destructor Documentation

geos::operation::buffer::BufferBuilder::BufferBuilder | ( | const BufferParameters & | nBufParams | ) |
| inline

Creates a new BufferBuilder

Parameters

  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.

## Member Function Documentation

geom::Geometry* geos::operation::buffer::BufferBuilder::bufferLineSingleSided | ( | const geom::Geometry * | g,
|  | double | distance,
|  | bool | leftSide
| ) |  |

Generates offset curve for linear geometry.

    @param g non-areal geometry object

Parameters

  distance | width of offset
  leftSide | controls on which side of the input geometry offset curve is generated.

Note
  For left-side offset curve, the offset will be at the left side of the input line and retain the same direction. For right-side offset curve, it'll be at the right side and in the opposite direction.
  BufferParameters::setSingleSided parameter, which is specific to areal geometries only, is ignored by this routine.
  Not in JTS: this is a GEOS extension

void geos::operation::buffer::BufferBuilder::setNoder | ( | noding::Noder * | newNoder | ) |
| inline

Sets the noding::Noder to use during noding. This allows choosing fast but non-robust noding, or slower but robust noding.

Parameters

  noder | the noder to use

void geos::operation::buffer::BufferBuilder::setWorkingPrecisionModel | ( | const geom::PrecisionModel * | pm | ) |
| 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.

Parameters

  pm | the precision model to use

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

- BufferBuilder.h