geos::noding::FastNodingValidator Class Reference

Validates that a collection of `SegmentString`s is correctly noded. More...

`#include <FastNodingValidator.h>`

## Public Member Functions

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

## Detailed Description

Validates that a collection of `SegmentString`s 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:

- Proper intersections between segments (i.e. the intersection is interior to both segments)
- Intersections at an interior vertex (i.e. with an endpoint or another interior vertex)

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

## Member Function Documentation

## checkValid()

void geos::noding::FastNodingValidator::checkValid | ( |  | ) |

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

Exceptions

  TopologyException | if an intersection is found

## getErrorMessage()

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

## isValid()

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

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

- FastNodingValidator.h