libgeos/libgeos — pull request #41 by mloskot (2014-12-01 15:56:12+00:00)
Title: Improve points co-linearity test in LineIntersector::hasIntersection.

Add simple test based on area of triangle created by three points of the given segment and test point.
The point intersects the segment, if area of the triangle is zero or close to zero: insignificant relatively to length of the segment.

Two interesting observations:
1. The fix allows to **pass** the **point on segment** test discussed in http://trac.osgeo.org/geos/ticket/591 and libgeos/libgeos#40
2. All GEOS tests **pass**, but one **fails**. Namely, "testA", `test<13>`): [tests/unit/algorithm/RobustLineIntersectorTest.cpp:247](https://github.com/mloskot/libgeos/blob/triangle-zero-intersects/tests/unit/algorithm/RobustLineIntersectorTest.cpp#L247) which is opposite to the "point on segment" test:

*Segment located as close and parallel as possible to X axis, so it seems on X axis (so 0,0 intersects), but JTS/GEOS are expected to detect it's not on X axis.*

I haven't tested this modification with JTS, but I might, so I could ask @dr-jts for comments too.