GEOS  3.8.0dev
Public Member Functions | Static Public Member Functions | List of all members
geos::algorithm::CentralEndpointIntersector Class Reference

Computes an approximate intersection of two line segments by taking the most central of the endpoints of the segments. More...

#include <CentralEndpointIntersector.h>

Public Member Functions

 CentralEndpointIntersector (const geom::Coordinate &p00, const geom::Coordinate &p01, const geom::Coordinate &p10, const geom::Coordinate &p11)
 
const geom::CoordinategetIntersection () const
 

Static Public Member Functions

static const geom::CoordinategetIntersection (const geom::Coordinate &p00, const geom::Coordinate &p01, const geom::Coordinate &p10, const geom::Coordinate &p11)
 

Detailed Description

Computes an approximate intersection of two line segments by taking the most central of the endpoints of the segments.

This is effective in cases where the segments are nearly parallel and should intersect at an endpoint. It is also a reasonable strategy for cases where the endpoint of one segment lies on or almost on the interior of another one. Taking the most central endpoint ensures that the computed intersection point lies in the envelope of the segments. Also, by always returning one of the input points, this should result in reducing segment fragmentation. Intended to be used as a last resort for computing ill-conditioned intersection situations which cause other methods to fail.

Author
Martin Davis
Version
1.8

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