GEOS 3.11.1
Public Member Functions | List of all members
geos::noding::NodingIntersectionFinder Class Reference

Finds non-noded intersections in a set of SegmentStrings, if any exist. More...

#include <NodingIntersectionFinder.h>

Inheritance diagram for geos::noding::NodingIntersectionFinder:
geos::noding::SegmentIntersector

Public Member Functions

 NodingIntersectionFinder (algorithm::LineIntersector &newLi)
 Creates an intersection finder which finds an interior intersection if one exists. More...
 
bool hasIntersection () const
 Tests whether an intersection was found. More...
 
const geom::CoordinategetInteriorIntersection () const
 Gets the computed location of the intersection. Due to round-off, the location may not be exact. More...
 
size_t count () const
 Gets the count of intersections found. More...
 
void setCheckEndSegmentsOnly (bool isCESO)
 Sets whether only end segments should be tested for interior intersection. More...
 
void setFindAllIntersections (bool fAI)
 Sets whether all intersections should be computed. More...
 
const std::vector< geom::Coordinate > & getIntersectionSegments () const
 Gets the endpoints of the intersecting segments. More...
 
void processIntersections (SegmentString *e0, std::size_t segIndex0, SegmentString *e1, std::size_t segIndex1) override
 This method is called by clients of the SegmentIntersector class to process intersections for two segments of the SegmentStrings being intersected. More...
 
bool isDone () const override
 Reports whether the client of this class needs to continue testing all intersections in an arrangement. More...
 
virtual void processIntersections (SegmentString *e0, std::size_t segIndex0, SegmentString *e1, std::size_t segIndex1)=0
 
virtual bool isDone () const
 Reports whether the client of this class needs to continue testing all intersections in an arrangement. More...
 

Detailed Description

Finds non-noded intersections in a set of SegmentStrings, if any exist.

Non-noded intersections include:

Version
1.7

Constructor & Destructor Documentation

◆ NodingIntersectionFinder()

geos::noding::NodingIntersectionFinder::NodingIntersectionFinder ( algorithm::LineIntersector newLi)
inline

Creates an intersection finder which finds an interior intersection if one exists.

Parameters
newLithe LineIntersector to use

Member Function Documentation

◆ count()

size_t geos::noding::NodingIntersectionFinder::count ( ) const
inline

Gets the count of intersections found.

Returns
the intersection count

◆ getInteriorIntersection()

const geom::Coordinate & geos::noding::NodingIntersectionFinder::getInteriorIntersection ( ) const
inline

Gets the computed location of the intersection. Due to round-off, the location may not be exact.

Returns
the coordinate for the intersection location

◆ getIntersectionSegments()

const std::vector< geom::Coordinate > & geos::noding::NodingIntersectionFinder::getIntersectionSegments ( ) const
inline

Gets the endpoints of the intersecting segments.

Returns
an array of the segment endpoints (p00, p01, p10, p11)

◆ hasIntersection()

bool geos::noding::NodingIntersectionFinder::hasIntersection ( ) const
inline

Tests whether an intersection was found.

Returns
true if an intersection was found

◆ isDone()

bool geos::noding::NodingIntersectionFinder::isDone ( ) const
inlineoverridevirtual

Reports whether the client of this class needs to continue testing all intersections in an arrangement.

Returns
true if there is not need to continue testing segments

The default implementation always return false (process all intersections).

Reimplemented from geos::noding::SegmentIntersector.

◆ processIntersections()

void geos::noding::NodingIntersectionFinder::processIntersections ( SegmentString e0,
std::size_t  segIndex0,
SegmentString e1,
std::size_t  segIndex1 
)
overridevirtual

This method is called by clients of the SegmentIntersector class to process intersections for two segments of the SegmentStrings being intersected.

Note
Some clients (such as MonotoneChains) may optimize away this call for segment pairs which they have determined do not intersect (e.g. by an disjoint envelope test).

Implements geos::noding::SegmentIntersector.

◆ setCheckEndSegmentsOnly()

void geos::noding::NodingIntersectionFinder::setCheckEndSegmentsOnly ( bool  isCESO)
inline

Sets whether only end segments should be tested for interior intersection.

This is a performance optimization that may be used if the segments have been previously noded by an appropriate algorithm. It may be known that any potential noding failures will occur only in end segments.

Parameters
isCESOwhether to test only end segments

◆ setFindAllIntersections()

void geos::noding::NodingIntersectionFinder::setFindAllIntersections ( bool  fAI)
inline

Sets whether all intersections should be computed.

When this is false (the default value) the value of isDone() is true after the first intersection is found.

Default is false.

Parameters
fAIwhether all intersections should be computed

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