public class VariableWidthBuffer extends Object
Only single lines are supported as input, since buffer widths generally need to be specified specifically for each line.
| Constructor and Description |
|---|
VariableWidthBuffer(org.locationtech.jts.geom.Geometry line,
double[] width)
Creates a generator for a variable-width line buffer.
|
| Modifier and Type | Method and Description |
|---|---|
static org.locationtech.jts.geom.Geometry |
buffer(org.locationtech.jts.geom.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 org.locationtech.jts.geom.Geometry |
bufferAternating(org.locationtech.jts.geom.Geometry line,
double width1,
double width2) |
org.locationtech.jts.geom.Geometry |
getResult()
Gets the computed variable-width line buffer.
|
static double[] |
interpolate(org.locationtech.jts.geom.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(org.locationtech.jts.geom.Geometry line,
double[] width)
line - width - public static org.locationtech.jts.geom.Geometry buffer(org.locationtech.jts.geom.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 org.locationtech.jts.geom.Geometry bufferAternating(org.locationtech.jts.geom.Geometry line,
double width1,
double width2)
public static double[] interpolate(org.locationtech.jts.geom.LineString line,
double start,
double end)
line - the line to interpolate alongstart - the start valueend - the end valuepublic org.locationtech.jts.geom.Geometry getResult()
Copyright © 2021. All rights reserved.