GEOS 3.14.0dev
|
#include <PolygonHoleJoiner.h>
Public Member Functions | |
PolygonHoleJoiner (const Polygon *p_inputPolygon) | |
std::unique_ptr< CoordinateSequence > | compute () |
Static Public Member Functions | |
static std::unique_ptr< Polygon > | joinAsPolygon (const Polygon *p_inputPolygon) |
static std::unique_ptr< CoordinateSequence > | join (const Polygon *p_inputPolygon) |
Friends | |
class | PolygonHoleJoiner::InteriorIntersectionDetector |
Transforms a polygon with holes into a single self-touching (invalid) ring by joining holes to the exterior shell or to another hole with out-and-back line segments. The holes are added in order of their envelopes (leftmost/lowest first). As the result shell develops, a hole may be added to what was originally another hole.
There is no attempt to optimize the quality of the join lines. In particular, holes may be joined by lines longer than is optimal. However, holes which touch the shell or other holes are joined at the touch point.
The class does not require the input polygon to have normal orientation (shell CW and rings CCW). The output ring is always CW.
std::unique_ptr< CoordinateSequence > geos::triangulate::polygon::PolygonHoleJoiner::compute | ( | ) |
Computes the joined ring.
|
static |
Joins the shell and holes of a polygon and returns the result as sequence of Coordinates.
p_inputPolygon | the polygon to join |
|
static |
Joins the shell and holes of a polygon and returns the result as an (invalid) Polygon.
p_inputPolygon | the polygon to join |