GEOS  3.8.0dev
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
geos::noding::IntersectionAdder Class Reference

#include <IntersectionAdder.h>

Inheritance diagram for geos::noding::IntersectionAdder:
geos::noding::SegmentIntersector

Public Member Functions

 IntersectionAdder (algorithm::LineIntersector &newLi)
 
algorithm::LineIntersectorgetLineIntersector ()
 
const geom::CoordinategetProperIntersectionPoint ()
 
bool hasIntersection ()
 
bool hasProperIntersection ()
 
bool hasProperInteriorIntersection ()
 
bool hasInteriorIntersection ()
 
void processIntersections (SegmentString *e0, size_t segIndex0, SegmentString *e1, size_t segIndex1) override
 
bool isDone () const override
 

Static Public Member Functions

static bool isAdjacentSegments (size_t i1, size_t i2)
 

Public Attributes

int numIntersections
 
int numInteriorIntersections
 
int numProperIntersections
 
int numTests
 

Detailed Description

Computes the intersections between two line segments in SegmentString and adds them to each string. The SegmentIntersector is passed to a Noder. The addIntersections method is called whenever the Noder detects that two SegmentStrings might intersect. This class is an example of the Strategy pattern.

Member Function Documentation

const geom::Coordinate* geos::noding::IntersectionAdder::getProperIntersectionPoint ( )
inline
Returns
the proper intersection point, or NULL if none was found
bool geos::noding::IntersectionAdder::hasInteriorIntersection ( )
inline

An interior intersection is an intersection which is in the interior of some segment.

bool geos::noding::IntersectionAdder::hasProperInteriorIntersection ( )
inline

A proper interior intersection is a proper intersection which is not contained in the set of boundary nodes set for this SegmentIntersector.

bool geos::noding::IntersectionAdder::hasProperIntersection ( )
inline

A proper intersection is an intersection which is interior to at least two line segments. Note that a proper intersection is not necessarily in the interior of the entire Geometry, since another edge may have an endpoint equal to the intersection, which according to SFS semantics can result in the point being on the Boundary of the Geometry.

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

Always process all intersections

Returns
false always

Reimplemented from geos::noding::SegmentIntersector.

void geos::noding::IntersectionAdder::processIntersections ( SegmentString e0,
size_t  segIndex0,
SegmentString e1,
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 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: