GEOS 3.11.1
|
#include <OffsetCurve.h>
Public Member Functions | |
OffsetCurve (const Geometry &geom, double dist) | |
OffsetCurve (const Geometry &geom, double dist, BufferParameters &bp) | |
std::unique_ptr< Geometry > | getCurve () |
Static Public Member Functions | |
static std::unique_ptr< Geometry > | getCurve (const Geometry &geom, double dist, int quadSegs, BufferParameters::JoinStyle joinStyle, double mitreLimit) |
static std::unique_ptr< Geometry > | getCurve (const Geometry &geom, double dist) |
static void | rawOffset (const LineString &geom, double dist, BufferParameters &bufParams, std::vector< CoordinateSequence * > &lineList) |
static void | rawOffset (const LineString &geom, double dist, std::vector< CoordinateSequence * > &lineList) |
Computes an offset curve from a geometry. The offset curve is a linear geometry which is offset a specified distance from the input. If the offset distance is positive the curve lies on the left side of the input; if it is negative the curve is on the right side.
The offset curve of a line is a LineString which The offset curve of a Point is an empty LineString. The offset curve of a Polygon is the boundary of the polygon buffer (which may be a MultiLineString. For a collection the output is a MultiLineString of the element offset curves.
The offset curve is computed as a single contiguous section of the geometry buffer boundary. In some geometric situations this definition is ill-defined. This algorithm provides a "best-effort" interpretation. In particular:
Offset curves support setting the number of quadrant segments, the join style, and the mitre limit (if applicable) via the BufferParameters.
|
inline |
Creates a new instance for computing an offset curve for a geometryat a given distance. with default quadrant segments BufferParameters::DEFAULT_QUADRANT_SEGMENTS and join style BufferParameters::JOIN_STYLE.
geom | the geometry to offset |
dist | the offset distance (positive = left, negative = right) |
|
inline |
Creates a new instance for computing an offset curve for a geometry at a given distance. allowing the quadrant segments and join style and mitre limit to be set via BufferParameters.
geom | |
dist | |
bp |
|
static |
Computes the offset curve of a geometry at a given distance, and for a specified quadrant segments, join style and mitre limit.
geom | a geometry |
dist | 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) |
|
static |
Gets the raw offset line. The quadrant segments and join style and mitre limit to be set via 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 offset |
dist | the offset distance |
bufParams | the buffer parameters to use |
lineList | the vector to populate with the return value |