buffer2 method

Geometry buffer2(
  1. double distance,
  2. int quadrantSegments
)

Computes a buffer area around this geometry having the given width and with a specified accuracy of approximation for circular arcs.

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 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 @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, int)

Implementation

Geometry buffer2(double distance, int quadrantSegments) {
  return BufferOp.bufferOp3(this, distance, quadrantSegments);
}