public class OffsetCurve extends Object
LineString
the offset curve is a line.
Point
the offset curve is an empty LineString
.
Polygon
the offset curve is the boundary of the polygon buffer (which
may be a MultiLineString
.
MultiLineString
containing the element offset curves.
BufferParameters
.Constructor and Description |
---|
OffsetCurve(Geometry geom,
double distance)
Creates a new instance for computing an offset curve for a geometryat a given distance.
|
OffsetCurve(Geometry geom,
double distance,
BufferParameters bufParams)
Creates a new instance for computing an offset curve for a geometry at a given distance.
|
Modifier and Type | Method and Description |
---|---|
Geometry |
getCurve()
Gets the computed offset curve.
|
static Geometry |
getCurve(Geometry geom,
double distance)
Computes the offset curve of a geometry at a given distance.
|
static Geometry |
getCurve(Geometry geom,
double distance,
int quadSegs,
int joinStyle,
double mitreLimit)
Computes the offset curve of a geometry at a given distance,
and for a specified quadrant segments, join style and mitre limit.
|
static Coordinate[] |
rawOffset(LineString geom,
double distance)
Gets the raw offset line, with default buffer parameters.
|
static Coordinate[] |
rawOffset(LineString geom,
double distance,
BufferParameters bufParams)
Gets the raw offset line.
|
public OffsetCurve(Geometry geom, double distance)
BufferParameters.DEFAULT_QUADRANT_SEGMENTS
)
and join style (BufferParameters#JOIN_STYLE
).geom
- the geometry to offsetdistance
- the offset distance (positive = left, negative = right)BufferParameters
public OffsetCurve(Geometry geom, double distance, BufferParameters bufParams)
BufferParameters
.geom
- distance
- bufParams
- public static Geometry getCurve(Geometry geom, double distance)
geom
- a geometrydistance
- the offset distance (positive = left, negative = right)public static Geometry getCurve(Geometry geom, double distance, int quadSegs, int joinStyle, double mitreLimit)
geom
- a geometrydistance
- the offset distance (positive = left, negative = right)quadSegs
- the quadrant segments (-1 for default)joinStyle
- the join style (-1 for default)mitreLimit
- the mitre limit (-1 for default)public Geometry getCurve()
public static Coordinate[] rawOffset(LineString geom, double distance, BufferParameters bufParams)
BufferParameters
.
The raw offset line may contain loops and other artifacts which are not present in the true offset curve. The raw offset line is matched to the buffer ring (which is clean) to extract the offset curve.
geom
- the linestring to offsetdistance
- the offset distancebufParams
- the buffer parameters to usepublic static Coordinate[] rawOffset(LineString geom, double distance)
geom
- the linestring to offsetdistance
- the offset distanceCopyright © 2022. All rights reserved.