Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an outer shell or a hole.
More...
#include <EdgeRing.h>
|
| void | add (const PolygonizeDirectedEdge *de) |
| | Adds a DirectedEdge which is known to form part of this ring.
|
| |
| EdgeRing * | findEdgeRingContaining (const std::vector< EdgeRing * > &erList) const |
| | Find the innermost enclosing shell EdgeRing containing this, if any.
|
| |
|
| EdgeRing (const geom::GeometryFactory *newFactory) |
| |
|
void | build (PolygonizeDirectedEdge *startDE) |
| |
|
void | computeHole () |
| |
|
const DeList & | getEdges () const |
| |
| bool | isHole () const |
| | Tests whether this ring is a hole.
|
| |
|
bool | isIncludedSet () const |
| |
|
bool | isIncluded () const |
| |
|
void | setIncluded (bool included) |
| |
|
bool | isProcessed () const |
| |
|
void | setProcessed (bool processed) |
| |
| void | setShell (EdgeRing *shellRing) |
| | Sets the containing shell ring of a ring that has been determined to be a hole.
|
| |
| bool | hasShell () const |
| | Tests whether this ring has a shell assigned to it.
|
| |
| EdgeRing * | getShell () |
| | Gets the shell for this ring. The shell is the ring itself if it is not a hole, otherwise it is the parent shell.
|
| |
| bool | isOuterHole () const |
| | Tests whether this ring is an outer hole. A hole is an outer hole if it is not contained by any shell.
|
| |
| bool | isOuterShell () const |
| | Tests whether this ring is an outer shell.
|
| |
| EdgeRing * | getOuterHole () const |
| | Gets the outer hole of a shell, if it has one. An outer hole is one that is not contained in any other shell.
|
| |
|
void | updateIncludedRecursive () |
| | Updates the included status for currently non-included shells based on whether they are adjacent to an included shell.
|
| |
| void | addHole (std::unique_ptr< geom::Curve > hole) |
| | Adds a hole to the polygon formed by this ring.
|
| |
|
void | addHole (EdgeRing *holeER) |
| |
| std::unique_ptr< geom::Surface > | getPolygon () |
| | Computes the Polygon formed by this ring and any contained holes.
|
| |
|
bool | isValid () const |
| | Tests if the LinearRing ring formed by this edge ring is topologically valid.
|
| |
|
void | computeValid () |
| |
| const geom::Curve * | getRingInternal () const |
| | Returns this ring or null if an Exception occurs while creating it (such as a topology problem).
|
| |
| std::unique_ptr< geom::Curve > | getRingOwnership () |
| | Returns this ring or null if an Exception occurs while creating it (such as a topology problem).
|
| |
|
geom::Location | locate (const geom::CoordinateXY &pt) const |
| |
Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an outer shell or a hole.
◆ add()
Adds a DirectedEdge which is known to form part of this ring.
- Parameters
-
| de | the DirectedEdge to add. Ownership to the caller. |
◆ addHole()
| void geos::operation::polygonize::EdgeRing::addHole |
( |
std::unique_ptr< geom::Curve > |
hole | ) |
|
Adds a hole to the polygon formed by this ring.
- Parameters
-
| hole | the LinearRing forming the hole. |
◆ findDirEdgesInRing()
Traverses a ring of DirectedEdges, accumulating them into a list.
This assumes that all dangling directed edges have been removed from the graph, so that there is always a next dirEdge.
- Parameters
-
| startDE | the DirectedEdge to start traversing at |
- Returns
- a vector of DirectedEdges that form a ring
◆ findEdgeRingContaining()
| EdgeRing * geos::operation::polygonize::EdgeRing::findEdgeRingContaining |
( |
const std::vector< EdgeRing * > & |
erList | ) |
const |
Find the innermost enclosing shell EdgeRing containing this, if any.
The innermost enclosing ring is the smallest enclosing ring. The algorithm used depends on the fact that:
ring A contains ring B iff envelope(ring A) contains envelope(ring B)
This routine is only safe to use if the chosen point of the hole is known to be properly contained in a shell (which is guaranteed to be the case if the hole does not touch its shell)
- Returns
- containing EdgeRing, if there is one
-
null if no containing EdgeRing is found
◆ getOuterHole()
| EdgeRing * geos::operation::polygonize::EdgeRing::getOuterHole |
( |
| ) |
const |
Gets the outer hole of a shell, if it has one. An outer hole is one that is not contained in any other shell.
Each disjoint connected group of shells is surrounded by an outer hole.
- Returns
- the outer hole edge ring, or nullptr
◆ getPolygon()
| std::unique_ptr< geom::Surface > geos::operation::polygonize::EdgeRing::getPolygon |
( |
| ) |
|
Computes the Polygon formed by this ring and any contained holes.
LinearRings ownership is transferred to returned polygon. Subsequent calls to the function will return NULL.
- Returns
- the Polygon formed by this ring and its holes.
◆ getRingInternal()
| const geom::Curve * geos::operation::polygonize::EdgeRing::getRingInternal |
( |
| ) |
const |
Returns this ring or null if an Exception occurs while creating it (such as a topology problem).
Ownership of the ring is retained by the object.
◆ getRingOwnership()
| std::unique_ptr< geom::Curve > geos::operation::polygonize::EdgeRing::getRingOwnership |
( |
| ) |
|
Returns this ring or null if an Exception occurs while creating it (such as a topology problem).
Caller gets ownership of the ring.
◆ getShell()
| EdgeRing * geos::operation::polygonize::EdgeRing::getShell |
( |
| ) |
|
|
inline |
Gets the shell for this ring. The shell is the ring itself if it is not a hole, otherwise it is the parent shell.
- Returns
- the shell for the ring
◆ hasShell()
| bool geos::operation::polygonize::EdgeRing::hasShell |
( |
| ) |
const |
|
inline |
Tests whether this ring has a shell assigned to it.
- Returns
- true if the ring has a shell
◆ isHole()
| bool geos::operation::polygonize::EdgeRing::isHole |
( |
| ) |
const |
|
inline |
Tests whether this ring is a hole.
Due to the way the edges in the polygonization graph are linked, a ring is a hole if it is oriented counter-clockwise.
- Returns
true if this ring is a hole
◆ isInList()
| static bool geos::operation::polygonize::EdgeRing::isInList |
( |
const geom::CoordinateXY & |
pt, |
|
|
const geom::CoordinateSequence * |
pts |
|
) |
| |
|
static |
Tests whether a given point is in an array of points. Uses a value-based test.
- Parameters
-
| pt | a Coordinate for the test point |
| pts | an array of Coordinate to test |
- Returns
true if the point is in the array
◆ isOuterHole()
| bool geos::operation::polygonize::EdgeRing::isOuterHole |
( |
| ) |
const |
|
inline |
Tests whether this ring is an outer hole. A hole is an outer hole if it is not contained by any shell.
- Returns
- true if the ring is an outer hole.
◆ isOuterShell()
| bool geos::operation::polygonize::EdgeRing::isOuterShell |
( |
| ) |
const |
|
inline |
Tests whether this ring is an outer shell.
- Returns
- true if the ring is an outer shell.
◆ ptNotInList()
Finds a point in a list of points which is not contained in another list of points.
- Parameters
-
| testPts | the CoordinateSequence to test |
| pts | the CoordinateSequence to test the input points against |
- Returns
- a Coordinate reference from
testPts which is not in pts, or Coordinate::nullCoord
◆ setShell()
| void geos::operation::polygonize::EdgeRing::setShell |
( |
EdgeRing * |
shellRing | ) |
|
|
inline |
Sets the containing shell ring of a ring that has been determined to be a hole.
- Parameters
-
The documentation for this class was generated from the following file: