GEOS  3.9.1dev
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
geos::operation::valid::ConnectedInteriorTester Class Reference

This class tests that the interior of an area Geometry (Polygon or MultiPolygon) is connected. More...

#include <ConnectedInteriorTester.h>

Collaboration diagram for geos::operation::valid::ConnectedInteriorTester:
[legend]

Public Member Functions

 ConnectedInteriorTester (geomgraph::GeometryGraph &newGeomGraph)
 
 ~ConnectedInteriorTester ()=default
 
geom::CoordinategetCoordinate ()
 
bool isInteriorsConnected ()
 

Static Public Member Functions

static const geom::CoordinatefindDifferentPoint (const geom::CoordinateSequence *coord, const geom::Coordinate &pt)
 

Protected Member Functions

void visitLinkedDirectedEdges (geomgraph::DirectedEdge *start)
 

Private Member Functions

void setInteriorEdgesInResult (geomgraph::PlanarGraph &graph)
 
void buildEdgeRings (std::vector< geomgraph::EdgeEnd * > *dirEdges, std::vector< geomgraph::EdgeRing * > &minEdgeRings)
 Form DirectedEdges in graph into Minimal EdgeRings. More...
 
void visitShellInteriors (const geom::Geometry *g, geomgraph::PlanarGraph &graph)
 
void visitInteriorRing (const geom::LineString *ring, geomgraph::PlanarGraph &graph)
 
bool hasUnvisitedShellEdge (std::vector< geomgraph::EdgeRing * > *edgeRings)
 
 ConnectedInteriorTester (const ConnectedInteriorTester &other)=delete
 
ConnectedInteriorTesteroperator= (const ConnectedInteriorTester &rhs)=delete
 

Private Attributes

geom::GeometryFactory::Ptr geometryFactory
 
geomgraph::GeometryGraphgeomGraph
 
geom::Coordinate disconnectedRingcoord
 
std::vector< geomgraph::EdgeRing * > maximalEdgeRings
 Used to track MaximalEdgeRings allocations. More...
 

Detailed Description

This class tests that the interior of an area Geometry (Polygon or MultiPolygon) is connected.

An area Geometry is invalid if the interior is disconnected. This can happen if:

If an inconsistency if found the location of the problem is recorded.

Definition at line 71 of file ConnectedInteriorTester.h.

Constructor & Destructor Documentation

geos::operation::valid::ConnectedInteriorTester::ConnectedInteriorTester ( geomgraph::GeometryGraph newGeomGraph)
geos::operation::valid::ConnectedInteriorTester::~ConnectedInteriorTester ( )
default
geos::operation::valid::ConnectedInteriorTester::ConnectedInteriorTester ( const ConnectedInteriorTester other)
privatedelete

Member Function Documentation

void geos::operation::valid::ConnectedInteriorTester::buildEdgeRings ( std::vector< geomgraph::EdgeEnd * > *  dirEdges,
std::vector< geomgraph::EdgeRing * > &  minEdgeRings 
)
private

Form DirectedEdges in graph into Minimal EdgeRings.

Minimal Edgerings must be used, because only they are guaranteed to provide a correct isHole computation.

Parameters
minEdgeRings: newly allocated minimal edge rings will be push_back'ed here. deletion responsibility is left to caller.
static const geom::Coordinate& geos::operation::valid::ConnectedInteriorTester::findDifferentPoint ( const geom::CoordinateSequence coord,
const geom::Coordinate pt 
)
static
geom::Coordinate& geos::operation::valid::ConnectedInteriorTester::getCoordinate ( )
bool geos::operation::valid::ConnectedInteriorTester::hasUnvisitedShellEdge ( std::vector< geomgraph::EdgeRing * > *  edgeRings)
private

Check if any shell ring has an unvisited edge. A shell ring is a ring which is not a hole and which has the interior of the parent area on the RHS. (Note that there may be non-hole rings with the interior on the LHS, since the interior of holes will also be polygonized into CW rings by the linkAllDirectedEdges() step)

Returns
true if there is an unvisited edge in a non-hole ring
bool geos::operation::valid::ConnectedInteriorTester::isInteriorsConnected ( )
ConnectedInteriorTester& geos::operation::valid::ConnectedInteriorTester::operator= ( const ConnectedInteriorTester rhs)
privatedelete
void geos::operation::valid::ConnectedInteriorTester::setInteriorEdgesInResult ( geomgraph::PlanarGraph graph)
private
void geos::operation::valid::ConnectedInteriorTester::visitInteriorRing ( const geom::LineString ring,
geomgraph::PlanarGraph graph 
)
private
void geos::operation::valid::ConnectedInteriorTester::visitLinkedDirectedEdges ( geomgraph::DirectedEdge start)
protected
void geos::operation::valid::ConnectedInteriorTester::visitShellInteriors ( const geom::Geometry g,
geomgraph::PlanarGraph graph 
)
private

Mark all the edges for the edgeRings corresponding to the shells of the input polygons. Note only ONE ring gets marked for each shell.

Member Data Documentation

geom::Coordinate geos::operation::valid::ConnectedInteriorTester::disconnectedRingcoord
private

Save a coordinate for any disconnected interior found the coordinate will be somewhere on the ring surrounding the disconnected interior

Definition at line 94 of file ConnectedInteriorTester.h.

geom::GeometryFactory::Ptr geos::operation::valid::ConnectedInteriorTester::geometryFactory
private

Definition at line 87 of file ConnectedInteriorTester.h.

geomgraph::GeometryGraph& geos::operation::valid::ConnectedInteriorTester::geomGraph
private

Definition at line 89 of file ConnectedInteriorTester.h.

std::vector<geomgraph::EdgeRing*> geos::operation::valid::ConnectedInteriorTester::maximalEdgeRings
private

Used to track MaximalEdgeRings allocations.

Definition at line 97 of file ConnectedInteriorTester.h.


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