GEOS  3.9.1dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
geos::noding::FastNodingValidator Class Reference

Validates that a collection of SegmentStrings is correctly noded. More...

#include <FastNodingValidator.h>

Collaboration diagram for geos::noding::FastNodingValidator:
[legend]

Public Member Functions

 FastNodingValidator (std::vector< noding::SegmentString * > &newSegStrings)
 
bool isValid ()
 Checks for an intersection and reports if one is found. More...
 
std::string getErrorMessage () const
 Returns an error message indicating the segments containing the intersection. More...
 
void checkValid ()
 Checks for an intersection and throws a TopologyException if one is found. More...
 

Private Member Functions

void execute ()
 
void checkInteriorIntersections ()
 
 FastNodingValidator (const FastNodingValidator &other)=delete
 
FastNodingValidatoroperator= (const FastNodingValidator &rhs)=delete
 

Private Attributes

geos::algorithm::LineIntersector li
 
std::vector< noding::SegmentString * > & segStrings
 
std::unique_ptr< NodingIntersectionFindersegInt
 
bool isValidVar
 

Detailed Description

Validates that a collection of SegmentStrings is correctly noded.

Indexing is used to improve performance. By default validation stops after a single non-noded intersection is detected. Alternatively, it can be requested to detect all intersections by using setFindAllIntersections(boolean).

The validator does not check for topology collapse situations (e.g. where two segment strings are fully co-incident).

The validator checks for the following situations which indicated incorrect noding:

The client may either test the isValid() condition, or request that a suitable TopologyException be thrown.

Definition at line 60 of file FastNodingValidator.h.

Constructor & Destructor Documentation

geos::noding::FastNodingValidator::FastNodingValidator ( std::vector< noding::SegmentString * > &  newSegStrings)
inline

Definition at line 64 of file FastNodingValidator.h.

geos::noding::FastNodingValidator::FastNodingValidator ( const FastNodingValidator other)
privatedelete

Member Function Documentation

void geos::noding::FastNodingValidator::checkInteriorIntersections ( )
private
void geos::noding::FastNodingValidator::checkValid ( )

Checks for an intersection and throws a TopologyException if one is found.

Exceptions
TopologyExceptionif an intersection is found

Referenced by geos::geomgraph::EdgeNodingValidator::checkValid().

Here is the caller graph for this function:

void geos::noding::FastNodingValidator::execute ( )
inlineprivate

Definition at line 113 of file FastNodingValidator.h.

std::string geos::noding::FastNodingValidator::getErrorMessage ( ) const

Returns an error message indicating the segments containing the intersection.

Returns
an error message documenting the intersection location
bool geos::noding::FastNodingValidator::isValid ( )
inline

Checks for an intersection and reports if one is found.

Returns
true if the arrangement contains an interior intersection

Definition at line 80 of file FastNodingValidator.h.

FastNodingValidator& geos::noding::FastNodingValidator::operator= ( const FastNodingValidator rhs)
privatedelete

Member Data Documentation

bool geos::noding::FastNodingValidator::isValidVar
private

Definition at line 110 of file FastNodingValidator.h.

geos::algorithm::LineIntersector geos::noding::FastNodingValidator::li
private

Definition at line 104 of file FastNodingValidator.h.

std::unique_ptr<NodingIntersectionFinder> geos::noding::FastNodingValidator::segInt
private

Definition at line 108 of file FastNodingValidator.h.

std::vector<noding::SegmentString*>& geos::noding::FastNodingValidator::segStrings
private

Definition at line 106 of file FastNodingValidator.h.


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