public class Buffer extends Object
In GIS, the positive (or negative) buffer of a geometry is defined as the Minkowski sum (or difference) of the geometry with a circle of radius equal to the absolute value of the buffer distance. In the CAD/CAM world buffers are known as offset curves. In morphological analysis the operation of postive and negative buffering is referred to 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 used to approximate curves.
The end cap style of a linear buffer may be specified. The following end cap styles are supported:
BufferParameters.CAP_ROUND - the usual round end caps
BufferParameters.CAP_FLAT - end caps are truncated flat at the line ends
BufferParameters.CAP_SQUARE - end caps are squared off at the buffer distance beyond the line ends
| Constructor and Description |
|---|
Buffer() |
| Modifier and Type | Method and Description |
|---|---|
static Geometry |
buffer(Geometry geometry,
double distance)
Computes the buffer of a geometry for a given buffer distance.
|
static Geometry |
buffer(Geometry geometry,
double distance,
BufferParameters parameters)
Comutes the buffer for a geometry for a given buffer distance
and accuracy of approximation.
|
static Geometry |
buffer(Geometry geometry,
double distance,
int quadrantSegments)
Comutes the buffer for a geometry for a given buffer distance
and accuracy of approximation.
|
static Geometry |
buffer(Geometry geometry,
double distance,
int quadrantSegments,
int endCapStyle)
Comutes the buffer for a geometry for a given buffer distance
and accuracy of approximation.
|
static Geometry |
buffer(Geometry geometry,
double distance,
int quadrantSegments,
int endCapStyle,
int joinStyle,
double mitreLimit) |
public static Geometry buffer(Geometry geometry, double distance)
g - the geometry to bufferdistance - the buffer distancepublic static Geometry buffer(Geometry geometry, double distance, BufferParameters parameters)
g - the geometry to bufferdistance - the buffer distanceparameters - the buffer parameters to usepublic static Geometry buffer(Geometry geometry, double distance, int quadrantSegments)
g - the geometry to bufferdistance - the buffer distancequadrantSegments - the number of segments used to approximate a quarter circlepublic static Geometry buffer(Geometry geometry, double distance, int quadrantSegments, int endCapStyle)
g - the geometry to bufferdistance - the buffer distancequadrantSegments - the number of segments used to approximate a quarter circleendCapStyle - the end cap style to useCopyright © 2015 Revolution Systems Inc.. All rights reserved.