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

Checks that a geomgraph::GeometryGraph representing an area (a geom::Polygon or geom::MultiPolygon) has consistent semantics for area geometries. This check is required for any reasonable polygonal model (including the OGC-SFS model, as well as models which allow ring self-intersection at single points) More...

#include <ConsistentAreaTester.h>

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

Public Member Functions

 ConsistentAreaTester (geomgraph::GeometryGraph *newGeomGraph)
 
 ~ConsistentAreaTester ()=default
 
geom::CoordinategetInvalidPoint ()
 
bool isNodeConsistentArea ()
 Check all nodes to see if their labels are consistent with area topology. More...
 
bool hasDuplicateRings ()
 

Private Member Functions

bool isNodeEdgeAreaLabelsConsistent ()
 

Private Attributes

algorithm::LineIntersector li
 
geomgraph::GeometryGraphgeomGraph
 Not owned. More...
 
relate::RelateNodeGraph nodeGraph
 
geom::Coordinate invalidPoint
 the intersection point found (if any) More...
 

Detailed Description

Checks that a geomgraph::GeometryGraph representing an area (a geom::Polygon or geom::MultiPolygon) has consistent semantics for area geometries. This check is required for any reasonable polygonal model (including the OGC-SFS model, as well as models which allow ring self-intersection at single points)

Checks include:

If an inconsistency is found the location of the problem is recorded and is available to the caller.

Definition at line 69 of file ConsistentAreaTester.h.

Constructor & Destructor Documentation

geos::operation::valid::ConsistentAreaTester::ConsistentAreaTester ( geomgraph::GeometryGraph newGeomGraph)

Creates a new tester for consistent areas.

Parameters
newGeomGraphthe topology graph of the area geometry. Caller keeps responsibility for its deletion
geos::operation::valid::ConsistentAreaTester::~ConsistentAreaTester ( )
default

Member Function Documentation

geom::Coordinate& geos::operation::valid::ConsistentAreaTester::getInvalidPoint ( )
Returns
the intersection point, or null if none was found
bool geos::operation::valid::ConsistentAreaTester::hasDuplicateRings ( )

Checks for two duplicate rings in an area. Duplicate rings are rings that are topologically equal (that is, which have the same sequence of points up to point order). If the area is topologically consistent (determined by calling the isNodeConsistentArea, duplicate rings can be found by checking for EdgeBundles which contain more than one geomgraph::EdgeEnd. (This is because topologically consistent areas cannot have two rings sharing the same line segment, unless the rings are equal). The start point of one of the equal rings will be placed in invalidPoint.

Returns
true if this area Geometry is topologically consistent but has two duplicate rings
bool geos::operation::valid::ConsistentAreaTester::isNodeConsistentArea ( )

Check all nodes to see if their labels are consistent with area topology.

Returns
true if this area has a consistent node labelling
bool geos::operation::valid::ConsistentAreaTester::isNodeEdgeAreaLabelsConsistent ( )
private

Check all nodes to see if their labels are consistent. If any are not, return false

Member Data Documentation

geomgraph::GeometryGraph* geos::operation::valid::ConsistentAreaTester::geomGraph
private

Not owned.

Definition at line 75 of file ConsistentAreaTester.h.

geom::Coordinate geos::operation::valid::ConsistentAreaTester::invalidPoint
private

the intersection point found (if any)

Definition at line 80 of file ConsistentAreaTester.h.

algorithm::LineIntersector geos::operation::valid::ConsistentAreaTester::li
private

Definition at line 72 of file ConsistentAreaTester.h.

relate::RelateNodeGraph geos::operation::valid::ConsistentAreaTester::nodeGraph
private

Definition at line 77 of file ConsistentAreaTester.h.


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