public class VariableBuffer extends Object
Only single linestrings are supported as input, since buffer widths are typically specified individually for each line.
| Constructor and Description |
|---|
VariableBuffer(Geometry line,
double[] distance)
Creates a generator for a variable-distance line buffer.
|
| Modifier and Type | Method and Description |
|---|---|
static Geometry |
buffer(Geometry line,
double[] distance)
Creates a buffer polygon along a line with the distance specified
at each vertex.
|
static Geometry |
buffer(Geometry line,
double startDistance,
double endDistance)
Creates a buffer polygon along a line with the buffer distance interpolated
between a start distance and an end distance.
|
static Geometry |
buffer(Geometry line,
double startDistance,
double midDistance,
double endDistance)
Creates a buffer polygon along a line with the buffer distance interpolated
between a start distance, a middle distance and an end distance.
|
Geometry |
getResult()
Computes the variable buffer polygon.
|
public VariableBuffer(Geometry line, double[] distance)
line - the linestring to bufferdistance - the buffer distance for each vertex of the linepublic static Geometry buffer(Geometry line, double startDistance, double endDistance)
line - the line to bufferstartDistance - the buffer width at the start of the lineendDistance - the buffer width at the end of the linepublic static Geometry buffer(Geometry line, double startDistance, double midDistance, double endDistance)
LinearRing (or the rings of a Polygon)
the start distance and end distance should be equal.line - the line to bufferstartDistance - the buffer width at the start of the linemidDistance - the buffer width at the middle vertex of the lineendDistance - the buffer width at the end of the linepublic static Geometry buffer(Geometry line, double[] distance)
line - the line to bufferdistance - the buffer distance for each vertex of the linepublic Geometry getResult()
Copyright © 2024. All rights reserved.