buffer3 method
Computes a buffer area around this geometry having the given width and with a specified accuracy of approximation for circular arcs, and using a specified end cap style.
Mathematically-exact buffer area boundaries can contain circular arcs.
To represent these arcs using linear geometry they must be approximated with line segments.
The quadrantSegments
argument allows controlling the
accuracy of the approximation
by specifying the number of line segments used to represent a quadrant of a circle
The end cap style specifies the buffer geometry that will be created at the ends of linestrings. The styles provided are:
BufferOp.CAP_ROUND
- (default) a semi-circleBufferOp.CAP_BUTT
- a straight line perpendicular to the end segmentBufferOp.CAP_SQUARE
- a half-square
The buffer operation always returns a polygonal result. The negative or zero-distance buffer of lines and points is always an empty {@link Polygon}. This is also the result for the buffers of degenerate (zero-area) polygons.
@param distance the width of the buffer (may be positive, negative or 0) @param quadrantSegments the number of line segments used to represent a quadrant of a circle @param endCapStyle the end cap style to use @return a polygonal geometry representing the buffer region (which may be empty)
@throws TopologyException if a robustness error occurs
@see #buffer(double) @see #buffer(double, int) @see BufferOp
Implementation
Geometry buffer3(double distance, int quadrantSegments, int endCapStyle) {
return BufferOp.bufferOp4(this, distance, quadrantSegments, endCapStyle);
}