geos::triangulate::polygon::PolygonHoleJoiner Class Reference

`#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

## Detailed Description

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.

## Member Function Documentation

## compute()

std::unique_ptr< CoordinateSequence > geos::triangulate::polygon::PolygonHoleJoiner::compute | ( |  | ) |

Computes the joined ring.

Returns
  the points in the joined ring

## join()

std::unique_ptr< CoordinateSequence > geos::triangulate::polygon::PolygonHoleJoiner::join | ( | const Polygon * | p_inputPolygon | ) |

static

Joins the shell and holes of a polygon and returns the result as sequence of Coordinates.

Parameters

  p_inputPolygon | the polygon to join

Returns
  the result coordinates

## joinAsPolygon()

std::unique_ptr< Polygon > geos::triangulate::polygon::PolygonHoleJoiner::joinAsPolygon | ( | const Polygon * | p_inputPolygon | ) |

static

Joins the shell and holes of a polygon and returns the result as an (invalid) Polygon.

Parameters

  p_inputPolygon | the polygon to join

Returns
  the result polygon

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

- PolygonHoleJoiner.h