Class VariableBuffer
- Namespace
- NetTopologySuite.Operation.Buffer
- Assembly
- NetTopologySuite.dll
Creates a buffer polygon with a varying buffer distance at each vertex along a line.
Only single lines are supported as input, since buffer widths generally need to be specified individually for each line.public class VariableBuffer
- Inheritance
-
VariableBuffer
- Inherited Members
Constructors
VariableBuffer(Geometry, double[])
Creates a generator for a variable-distance line buffer.
public VariableBuffer(Geometry line, double[] distance)
Parameters
line
GeometryThe linestring to buffer
distance
double[]The buffer distance for each vertex of the line
Methods
Buffer(Geometry, double, double)
Creates a buffer polygon along a line with the buffer distance interpolated between a start distance and an end distance.
public static Geometry Buffer(Geometry line, double startDistance, double endDistance)
Parameters
line
GeometryThe line to buffer
startDistance
doubleThe buffer width at the start of the line
endDistance
doubleThe buffer width at the end of the line
Returns
- Geometry
The variable-distance buffer polygon
Buffer(Geometry, double, double, double)
Creates a buffer polygon along a line with the buffer distance interpolated between a start distance, a middle distance and an end distance. The middle distance is attained at the vertex at or just past the half-length of the line. For smooth buffering of a LinearRing (or the rings of a Polygon) the start distance and end distance should be equal.
public static Geometry Buffer(Geometry line, double startDistance, double midDistance, double endDistance)
Parameters
line
GeometryThe line to buffer
startDistance
doubleThe buffer width at the start of the line
midDistance
doubleThe buffer width at the middle vertex of the line
endDistance
doubleThe buffer width at the end of the line
Returns
- Geometry
The variable-distance buffer polygon
Buffer(Geometry, double[])
Creates a buffer polygon along a line with the distance specified at each vertex.
public static Geometry Buffer(Geometry line, double[] distance)
Parameters
Returns
- Geometry
The variable-width buffer polygon
GetResult()
Computes the buffer polygon.
public Geometry GetResult()
Returns
- Geometry
A buffer polygon