public class VariableWidthBuffer
extends java.lang.Object
Only single lines are supported as input, since buffer widths generally need to be specified specifically for each line.
Constructor | Description |
---|---|
VariableWidthBuffer(Geometry line,
double[] width) |
Creates a generator for a variable-width line buffer.
|
Modifier and Type | Method | Description |
---|---|---|
static Geometry |
buffer(Geometry line,
double startWidth,
double endWidth) |
Creates a buffer polygon along a line with the width interpolated
between a start width and an end width.
|
static Geometry |
bufferAternating(Geometry line,
double width1,
double width2) |
|
Geometry |
getResult() |
Gets the computed variable-width line buffer.
|
static double[] |
interpolate(LineString line,
double start,
double end) |
Computes a list of values for the points along a line by
interpolating between values for the start and end point.
|
public VariableWidthBuffer(Geometry line, double[] width)
line
- width
- public static Geometry buffer(Geometry line, double startWidth, double endWidth)
line
- the line to bufferstartWidth
- the buffer width at the start of the lineendWidth
- the buffer width at the end of the linepublic static Geometry bufferAternating(Geometry line, double width1, double width2)
public static double[] interpolate(LineString line, double start, double end)
line
- the line to interpolate alongstart
- the start valueend
- the end valuepublic Geometry getResult()
Copyright © 2018. All rights reserved.