#include <PolygonBuilder.h>
Definition at line 45 of file g/PolygonBuilder.h.
geos::operation::overlayng::PolygonBuilder::PolygonBuilder |
( |
std::vector< OverlayEdge * > & |
resultAreaEdges, |
|
|
const geom::GeometryFactory * |
geomFact, |
|
|
bool |
p_isEnforcePolygonal |
|
) |
| |
|
inline |
geos::operation::overlayng::PolygonBuilder::PolygonBuilder |
( |
const PolygonBuilder & |
| ) |
|
|
delete |
For the set of minimal rings comprising a maximal ring, assigns the holes to the shell known to contain them. Assigning the holes directly to the shell serves two purposes:
- it is faster than using a point-in-polygon check later on.
- it ensures correctness, since if the PIP test was used the point chosen might lie on the shell, which might return an incorrect result from the PIP test
void geos::operation::overlayng::PolygonBuilder::assignShellsAndHoles |
( |
std::vector< OverlayEdgeRing * > & |
minRings | ) |
|
|
private |
std::vector<std::unique_ptr<MaximalEdgeRing> > geos::operation::overlayng::PolygonBuilder::buildMaximalRings |
( |
std::vector< OverlayEdge * > & |
edges | ) |
|
|
private |
For all OverlayEdge*s in result, form them into MaximalEdgeRings
void geos::operation::overlayng::PolygonBuilder::buildMinimalRings |
( |
std::vector< std::unique_ptr< MaximalEdgeRing >> & |
maxRings | ) |
|
|
private |
void geos::operation::overlayng::PolygonBuilder::buildRings |
( |
std::vector< OverlayEdge * > & |
resultAreaEdges | ) |
|
|
private |
std::vector<std::unique_ptr<geom::Polygon> > geos::operation::overlayng::PolygonBuilder::computePolygons |
( |
std::vector< OverlayEdgeRing * > |
shellList | ) |
|
|
private |
Finds the single shell, if any, out of a list of minimal rings derived from a maximal ring. The other possibility is that they are a set of (connected) holes, in which case no shell will be found.
- Returns
- the shell ring, if there is one or null, if all rings are holes
std::vector<std::unique_ptr<geom::Polygon> > geos::operation::overlayng::PolygonBuilder::getPolygons |
( |
| ) |
|
std::vector<OverlayEdgeRing*> geos::operation::overlayng::PolygonBuilder::getShellRings |
( |
| ) |
|
void geos::operation::overlayng::PolygonBuilder::linkResultAreaEdgesMax |
( |
std::vector< OverlayEdge * > & |
resultEdges | ) |
|
|
private |
void geos::operation::overlayng::PolygonBuilder::placeFreeHoles |
( |
std::vector< OverlayEdgeRing * > |
shellList, |
|
|
std::vector< OverlayEdgeRing * > |
freeHoleList |
|
) |
| |
|
private |
Place holes have not yet been assigned to a shell. These "free" holes should all be properly contained in their parent shells, so it is safe to use the findEdgeRingContaining
method. (This is the case because any holes which are NOT properly contained (i.e. are connected to their parent shell) would have formed part of a MaximalEdgeRing and been handled in a previous step).
- Exceptions
-
TopologyException | if a hole cannot be assigned to a shell |
std::vector<OverlayEdgeRing*> geos::operation::overlayng::PolygonBuilder::storeMinimalRings |
( |
std::vector< std::unique_ptr< OverlayEdgeRing >> & |
minRings | ) |
|
|
private |
The lifespan of the OverlayEdgeRings is tieds to the lifespan of the PolygonBuilder, so we hold them on the PolygonBuilder and use bare pointers for managing the relationships
std::vector<OverlayEdgeRing*> geos::operation::overlayng::PolygonBuilder::freeHoleList |
|
private |
bool geos::operation::overlayng::PolygonBuilder::isEnforcePolygonal |
|
private |
std::vector<OverlayEdgeRing*> geos::operation::overlayng::PolygonBuilder::shellList |
|
private |
std::vector<std::unique_ptr<OverlayEdgeRing> > geos::operation::overlayng::PolygonBuilder::vecOER |
|
private |
The documentation for this class was generated from the following file: