GEOS 3.11.1
|
#include <OffsetSegmentGenerator.h>
Public Member Functions | |
OffsetSegmentGenerator (const geom::PrecisionModel *newPrecisionModel, const BufferParameters &bufParams, double distance) | |
bool | hasNarrowConcaveAngle () const |
void | initSideSegments (const geom::Coordinate &nS1, const geom::Coordinate &nS2, int nSide) |
void | getCoordinates (std::vector< geom::CoordinateSequence * > &to) |
void | closeRing () |
void | createCircle (const geom::Coordinate &p, double distance) |
Adds a CW circle around a point. | |
void | createSquare (const geom::Coordinate &p, double distance) |
Adds a CW square around a point. | |
void | addFirstSegment () |
Add first offset point. | |
void | addLastSegment () |
Add last offset point. | |
void | addNextSegment (const geom::Coordinate &p, bool addStartPoint) |
void | addLineEndCap (const geom::Coordinate &p0, const geom::Coordinate &p1) |
Add an end cap around point p1, terminating a line segment coming from p0. | |
void | addSegments (const geom::CoordinateSequence &pts, bool isForward) |
Static Public Member Functions | |
static void | computeOffsetSegment (const geom::LineSegment &seg, int side, double distance, geom::LineSegment &offset) |
Compute an offset segment for an input segment on a given side and at a given distance. More... | |
Generates segments which form an offset curve. Supports all end cap and join options provided for buffering. Implements various heuristics to produce smoother, simpler curves which are still within a reasonable tolerance of the true curve.
|
static |
Compute an offset segment for an input segment on a given side and at a given distance.
The offset points are computed in full double precision, for accuracy.
seg | the segment to offset |
side | the side of the segment the offset lies on |
distance | the offset distance |
offset | the points computed for the offset segment |
|
inline |
Get coordinates by taking ownership of them
After this call, the coordinates reference in this object are dropped. Calling twice will segfault...
FIXME: refactor memory management of this
|
inline |
Tests whether the input has a narrow concave angle (relative to the offset distance). In this case the generated offset curve will contain self-intersections and heuristic closing segments. This is expected behaviour in the case of buffer curves. For pure offset curves, the output needs to be further treated before it can be used.