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

#include <SnappingIntersectionAdder.h>

Inheritance diagram for geos::noding::snap::SnappingIntersectionAdder:
[legend]
Collaboration diagram for geos::noding::snap::SnappingIntersectionAdder:
[legend]

Public Member Functions

 SnappingIntersectionAdder (double p_snapTolerance, SnappingPointIndex &p_snapPointIndex)
 
void processIntersections (SegmentString *e0, size_t segIndex0, SegmentString *e1, size_t segIndex1) override
 
bool isDone () const override
 Reports whether the client of this class needs to continue testing all intersections in an arrangement. More...
 
- Public Member Functions inherited from geos::noding::SegmentIntersector
virtual ~SegmentIntersector ()
 

Private Member Functions

void processNearVertex (SegmentString *srcSS, size_t srcIndex, const geom::Coordinate &p, SegmentString *ss, size_t segIndex, const geom::Coordinate &p0, const geom::Coordinate &p1)
 

Static Private Member Functions

static bool isAdjacent (SegmentString *ss0, size_t segIndex0, SegmentString *ss1, size_t segIndex1)
 

Private Attributes

algorithm::LineIntersector li
 
double snapTolerance
 
SnappingPointIndexsnapPointIndex
 

Additional Inherited Members

- Protected Member Functions inherited from geos::noding::SegmentIntersector
 SegmentIntersector ()
 

Detailed Description

Definition at line 45 of file SnappingIntersectionAdder.h.

Constructor & Destructor Documentation

geos::noding::snap::SnappingIntersectionAdder::SnappingIntersectionAdder ( double  p_snapTolerance,
SnappingPointIndex p_snapPointIndex 
)

Member Function Documentation

static bool geos::noding::snap::SnappingIntersectionAdder::isAdjacent ( SegmentString ss0,
size_t  segIndex0,
SegmentString ss1,
size_t  segIndex1 
)
staticprivate

Tests if segments are adjacent on the same SegmentString. Closed segStrings require a check for the point shared by the beginning and end segments.

bool geos::noding::snap::SnappingIntersectionAdder::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.

Definition at line 97 of file SnappingIntersectionAdder.h.

void geos::noding::snap::SnappingIntersectionAdder::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.

void geos::noding::snap::SnappingIntersectionAdder::processNearVertex ( SegmentString srcSS,
size_t  srcIndex,
const geom::Coordinate p,
SegmentString ss,
size_t  segIndex,
const geom::Coordinate p0,
const geom::Coordinate p1 
)
private

If an endpoint of one segment is near the interior of the other segment, add it as an intersection. EXCEPT if the endpoint is also close to a segment endpoint (since this can introduce "zigs" in the linework).

This resolves situations where a segment A endpoint is extremely close to another segment B, but is not quite crossing. Due to robustness issues in orientation detection, this can result in the snapped segment A crossing segment B without a node being introduced.

Member Data Documentation

algorithm::LineIntersector geos::noding::snap::SnappingIntersectionAdder::li
private

Definition at line 49 of file SnappingIntersectionAdder.h.

SnappingPointIndex& geos::noding::snap::SnappingIntersectionAdder::snapPointIndex
private

Definition at line 51 of file SnappingIntersectionAdder.h.

double geos::noding::snap::SnappingIntersectionAdder::snapTolerance
private

Definition at line 50 of file SnappingIntersectionAdder.h.


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