GEOS  3.3.3
Public Member Functions | List of all members
geos::noding::SingleInteriorIntersectionFinder Class Reference

Finds an interior intersection in a set of SegmentString, if one exists. Only the first intersection found is reported. More...

#include <SingleInteriorIntersectionFinder.h>

Inheritance diagram for geos::noding::SingleInteriorIntersectionFinder:
geos::noding::SegmentIntersector

Public Member Functions

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

Detailed Description

Finds an interior intersection in a set of SegmentString, if one exists. Only the first intersection found is reported.

Version
1.7

Constructor & Destructor Documentation

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

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

Parameters
lithe LineIntersector to use

Member Function Documentation

const geom::Coordinate& geos::noding::SingleInteriorIntersectionFinder::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
const std::vector<geom::Coordinate>& geos::noding::SingleInteriorIntersectionFinder::getIntersectionSegments ( ) const
inline

Gets the endpoints of the intersecting segments.

Returns
an array of the segment endpoints (p00, p01, p10, p11)
bool geos::noding::SingleInteriorIntersectionFinder::hasIntersection ( ) const
inline

Tests whether an intersection was found.

Returns
true if an intersection was found
bool geos::noding::SingleInteriorIntersectionFinder::isDone ( ) const
inlinevirtual

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.

void geos::noding::SingleInteriorIntersectionFinder::processIntersections ( SegmentString e0,
int  segIndex0,
SegmentString e1,
int  segIndex1 
)
virtual

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

Note that 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.


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