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

#include <IndexedNestedShellTester.h>

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

Public Member Functions

 IndexedNestedShellTester (const geomgraph::GeometryGraph &g, size_t initialCapacity)
 
void add (const geom::Polygon &p)
 
const geom::CoordinategetNestedPoint ()
 
bool isNonNested ()
 

Private Member Functions

void compute ()
 
void checkShellNotNested (const geom::LinearRing *shell, PolygonIndexedLocators &locs)
 
const geom::CoordinatecheckShellInsideHole (const geom::LinearRing *shell, algorithm::locate::IndexedPointInAreaLocator &holeLoc)
 

Private Attributes

const geomgraph::GeometryGraphgraph
 Externally owned. More...
 
std::vector< const geom::Polygon * > polys
 
const geom::CoordinatenestedPt
 
bool processed
 

Detailed Description

Definition at line 52 of file IndexedNestedShellTester.h.

Constructor & Destructor Documentation

geos::operation::valid::IndexedNestedShellTester::IndexedNestedShellTester ( const geomgraph::GeometryGraph g,
size_t  initialCapacity 
)

Member Function Documentation

void geos::operation::valid::IndexedNestedShellTester::add ( const geom::Polygon p)
inline

Definition at line 57 of file IndexedNestedShellTester.h.

const geom::Coordinate* geos::operation::valid::IndexedNestedShellTester::checkShellInsideHole ( const geom::LinearRing shell,
algorithm::locate::IndexedPointInAreaLocator holeLoc 
)
private

This routine checks to see if a shell is properly contained in a hole. It assumes that the edges of the shell and hole do not properly intersect.

Returns
null if the shell is properly contained, or a Coordinate which is not inside the hole if it is not
void geos::operation::valid::IndexedNestedShellTester::checkShellNotNested ( const geom::LinearRing shell,
PolygonIndexedLocators &  locs 
)
private

Check if a shell is incorrectly nested within a polygon. This is the case if the shell is inside the polygon shell, but not inside a polygon hole. (If the shell is inside a polygon hole, the nesting is valid.)

The algorithm used relies on the fact that the rings must be properly contained. E.g. they cannot partially overlap (this has been previously checked by checkRelateConsistency

void geos::operation::valid::IndexedNestedShellTester::compute ( )
private
const geom::Coordinate* geos::operation::valid::IndexedNestedShellTester::getNestedPoint ( )
bool geos::operation::valid::IndexedNestedShellTester::isNonNested ( )

Member Data Documentation

const geomgraph::GeometryGraph& geos::operation::valid::IndexedNestedShellTester::graph
private

Externally owned.

Definition at line 94 of file IndexedNestedShellTester.h.

const geom::Coordinate* geos::operation::valid::IndexedNestedShellTester::nestedPt
private

Definition at line 99 of file IndexedNestedShellTester.h.

std::vector<const geom::Polygon*> geos::operation::valid::IndexedNestedShellTester::polys
private

Definition at line 96 of file IndexedNestedShellTester.h.

bool geos::operation::valid::IndexedNestedShellTester::processed
private

Definition at line 101 of file IndexedNestedShellTester.h.


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