GEOS 3.3.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
geos::operation::buffer::OffsetSegmentGenerator Class Reference

`#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)
| Get coordinates by taking ownership of them.
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)

## Detailed Description

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.

Author
  Martin Davis

## Member Function Documentation

void geos::operation::buffer::OffsetSegmentGenerator::getCoordinates | ( | std::vector< geom::CoordinateSequence * > & | to | ) |

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

bool geos::operation::buffer::OffsetSegmentGenerator::hasNarrowConcaveAngle | ( |  | ) | const

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.

Returns
  true if the input has a narrow concave angle

The documentation for this class was generated from the following file:

- OffsetSegmentGenerator.h