buffer method

Geometry buffer(
  1. double distance
)

Computes a buffer area around this geometry having the given width. The buffer of a Geometry is the Minkowski sum or difference of the geometry with a disc of radius abs(distance).

Mathematically-exact buffer area boundaries can contain circular arcs. To represent these arcs using linear geometry they must be approximated with line segments. The buffer geometry is constructed using 8 segments per quadrant to approximate the circular arcs. The end cap style is CAP_ROUND.

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) @return a polygonal geometry representing the buffer region (which may be empty)

@throws TopologyException if a robustness error occurs

@see #buffer(double, int) @see #buffer(double, int, int)

Implementation

Geometry buffer(double distance) {
  return BufferOp.bufferOp(this, distance);
}