#include <geos/opBuffer.h>
Public Types | |
enum | { CAP_ROUND, CAP_BUTT, CAP_SQUARE } |
Public Member Functions | |
BufferOp (const geom::Geometry *g) | |
void | setEndCapStyle (int nEndCapStyle) |
void | setQuadrantSegments (int nQuadrantSegments) |
geom::Geometry * | getResultGeometry (double nDistance) |
geom::Geometry * | getResultGeometry (double nDistance, int nQuadrantSegments) |
Static Public Member Functions | |
static geom::Geometry * | bufferOp (const geom::Geometry *g, double distance, int quadrantSegments=OffsetCurveBuilder::DEFAULT_QUADRANT_SEGMENTS, int endCapStyle=BufferOp::CAP_ROUND) |
In GIS, the buffer of a geometry is defined as the Minkowski sum or difference of the geometry with a circle with radius equal to the absolute value of the buffer distance. In the CAD/CAM world buffers are known as offset curves. In morphological analysis they are known as erosion and dilation.
The buffer operation always returns a polygonal result. The negative or zero-distance buffer of lines and points is always an empty Polygon.
Since true buffer curves may contain circular arcs, computed buffer polygons can only be approximations to the true geometry. The user can control the accuracy of the curve approximation by specifying the number of linear segments with which to approximate a curve.
The end cap style of a linear buffer may be specified. The following end cap styles are supported:
Last port: operation/buffer/BufferOp.java rev. 1.31 (JTS-1.7)
anonymous enum |
geos::operation::buffer::BufferOp::BufferOp | ( | const geom::Geometry * | g | ) | [inline] |
static geom::Geometry* geos::operation::buffer::BufferOp::bufferOp | ( | const geom::Geometry * | g, | |
double | distance, | |||
int | quadrantSegments = OffsetCurveBuilder::DEFAULT_QUADRANT_SEGMENTS , |
|||
int | endCapStyle = BufferOp::CAP_ROUND | |||
) | [static] |
void geos::operation::buffer::BufferOp::setEndCapStyle | ( | int | nEndCapStyle | ) | [inline] |
Specifies the end cap style of the generated buffer. The styles supported are CAP_ROUND, CAP_BUTT, and CAP_SQUARE. The default is CAP_ROUND.
endCapStyle | the end cap style to specify |
void geos::operation::buffer::BufferOp::setQuadrantSegments | ( | int | nQuadrantSegments | ) | [inline] |
Specifies the end cap style of the generated buffer. The styles supported are CAP_ROUND, CAP_BUTT, and CAP_SQUARE. The default is CAP_ROUND.
endCapStyle | the end cap style to specify |
geom::Geometry* geos::operation::buffer::BufferOp::getResultGeometry | ( | double | nDistance | ) |
geom::Geometry* geos::operation::buffer::BufferOp::getResultGeometry | ( | double | nDistance, | |
int | nQuadrantSegments | |||
) |
Comutes the buffer for a geometry for a given buffer distance and accuracy of approximation.
g | the geometry to buffer | |
distance | the buffer distance | |
quadrantSegments | the number of segments used to approximate a quarter circle |