Class VariableBuffer
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.
Inherited Members
Namespace: NetTopologySuite.Operation.Buffer
Assembly: NetTopologySuite.dll
Syntax
public class VariableBuffer
Constructors
| Improve this Doc View SourceVariableBuffer(Geometry, Double[])
Creates a generator for a variable-distance line buffer.
Declaration
public VariableBuffer(Geometry line, double[] distance)
Parameters
Type | Name | Description |
---|---|---|
Geometry | line | The linestring to buffer |
Double[] | distance | The buffer distance for each vertex of the line |
Methods
| Improve this Doc View SourceBuffer(Geometry, Double, Double)
Creates a buffer polygon along a line with the buffer distance interpolated between a start distance and an end distance.
Declaration
public static Geometry Buffer(Geometry line, double startDistance, double endDistance)
Parameters
Type | Name | Description |
---|---|---|
Geometry | line | The line to buffer |
Double | startDistance | The buffer width at the start of the line |
Double | endDistance | The buffer width at the end of the line |
Returns
Type | Description |
---|---|
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.
Declaration
public static Geometry Buffer(Geometry line, double startDistance, double midDistance, double endDistance)
Parameters
Type | Name | Description |
---|---|---|
Geometry | line | The line to buffer |
Double | startDistance | The buffer width at the start of the line |
Double | midDistance | The buffer width at the middle vertex of the line |
Double | endDistance | The buffer width at the end of the line |
Returns
Type | Description |
---|---|
Geometry | The variable-distance buffer polygon |
Buffer(Geometry, Double[])
Creates a buffer polygon along a line with the distance specified at each vertex.
Declaration
public static Geometry Buffer(Geometry line, double[] distance)
Parameters
Type | Name | Description |
---|---|---|
Geometry | line | The line to buffer |
Double[] | distance | The buffer distance for each vertex of the line |
Returns
Type | Description |
---|---|
Geometry | The variable-width buffer polygon |
GetResult()
Computes the buffer polygon.
Declaration
public Geometry GetResult()
Returns
Type | Description |
---|---|
Geometry | A buffer polygon |